Bump version: 0.2 → 0.3 #3
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Publish | |
on: | |
push: | |
tags: | |
- "*" | |
jobs: | |
build: | |
name: Build packages | |
runs-on: ubuntu-24.04 | |
environment: publish | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Setup Python | |
uses: actions/setup-python@v5 | |
with: | |
python-version: "3.13" | |
- name: Build packages | |
run: | | |
pip install -r requirements/testing.txt | |
make package | |
- name: Upload packages | |
uses: actions/upload-artifact@v4 | |
with: | |
name: python-package-distributions | |
path: dist/ | |
if-no-files-found: error | |
publish-to-pypi: | |
name: Publish package on PyPI | |
needs: | |
- build | |
runs-on: ubuntu-24.04 | |
environment: | |
name: pypi | |
url: https://pypi.org/project/${{ github.event.repository.name }}/${{ github.ref_name }}/ | |
permissions: | |
id-token: write | |
steps: | |
- name: Download packages | |
uses: actions/download-artifact@v4 | |
with: | |
name: python-package-distributions | |
path: dist/ | |
- name: Publish to PyPI | |
uses: pypa/gh-action-pypi-publish@release/v1 | |
github-release: | |
name: Publish package on GitHub Releases | |
needs: | |
- build | |
runs-on: ubuntu-24.04 | |
environment: | |
name: github-releases | |
url: ${{ github.server_url }}/${{ github.repository }}/releases/tag/${{ github.ref_name }} | |
permissions: | |
contents: write | |
id-token: write | |
steps: | |
- name: Download packages | |
uses: actions/download-artifact@v4 | |
with: | |
name: python-package-distributions | |
path: dist/ | |
- name: Sign packages | |
uses: sigstore/[email protected] | |
with: | |
inputs: >- | |
./dist/*.tar.gz | |
./dist/*.whl | |
- name: Create GitHub Release | |
env: | |
GITHUB_TOKEN: ${{ github.token }} | |
run: >- | |
gh release create | |
'${{ github.ref_name }}' | |
--repo '${{ github.repository }}' | |
--title '${{ github.event.repository.name }} ${{ github.ref_name }}' | |
- name: Upload artifact signatures to GitHub Release | |
env: | |
GITHUB_TOKEN: ${{ github.token }} | |
run: >- | |
gh release upload | |
'${{ github.ref_name }}' dist/** | |
--repo '${{ github.repository }}' |