Skip to content

bump: version 0.4.1 → 0.5.0 #3

bump: version 0.4.1 → 0.5.0

bump: version 0.4.1 → 0.5.0 #3

Workflow file for this run

name: release
on:
push:
tags:
- 'v*'
jobs:
build_sdist:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v4
with:
python-version: "3.12"
- name: install dependencies
run: |
python -m pip install --upgrade pip
pip install build twine
- name: build source tarball
run: |
python -m build --sdist
twine check --strict dist/*
- uses: actions/upload-artifact@v3
with:
path: dist/*
build_wheels:
name: wheel on ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
# see https://github.com/pypa/cibuildwheel/issues/933
# - uses: pypa/cibuildwheel@v2
- name: Build wheels
run: pipx run cibuildwheel==2.17.0
- name: upload wheels
uses: actions/upload-artifact@v4
with:
path: wheelhouse/*.whl
publish_dev_build:
needs: [build_sdist, build_wheels]
runs-on: ubuntu-latest
environment:
name: testpypi
url: https://pypi.org/p/detectree
permissions:
# IMPORTANT: this permission is mandatory for trusted publishing
id-token: write
steps:
- uses: actions/checkout@v4
- uses: actions/download-artifact@v3
with:
name: artifact
path: dist
- name: publish to test pypi
uses: pypa/gh-action-pypi-publish@release/v1
with:
repository-url: https://test.pypi.org/legacy/
skip-existing: true
release:
needs: [publish_dev_build]
runs-on: ubuntu-latest
environment:
name: pypi
url: https://pypi.org/p/detectree
permissions:
# IMPORTANT: this permission is mandatory for trusted publishing
id-token: write
# see https://github.com/softprops/action-gh-release/issues/236
contents: write
# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v4
- name: update changelog
id: changelog
uses: requarks/changelog-action@v1
with:
token: ${{ github.token }}
tag: ${{ github.ref_name }}
- name: create Release
uses: ncipollo/[email protected]
with:
allowUpdates: true
draft: false
makeLatest: true
name: ${{ github.ref_name }}
body: ${{ steps.changelog.outputs.changes }}
token: ${{ github.token }}
- name: publish to pypi
uses: pypa/gh-action-pypi-publish@release/v1