Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add a Publishing workflow #26

Merged
merged 4 commits into from
Oct 18, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 19 additions & 9 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@ on:
- '*'
pull_request:
workflow_dispatch:
release:
types:
- published

permissions:
contents: read
Expand Down Expand Up @@ -172,17 +175,24 @@ jobs:
name: wheels-sdist
path: dist

release:
name: Release
publish:
name: Publish Python distributions to PyPI
runs-on: ubuntu-latest
if: "startsWith(github.ref, 'refs/tags/')"
if: github.event_name == 'release' && github.event.action == 'published'
needs: [linux, musllinux, windows, macos, sdist]
environment:
name: pypi
url: https://pypi.org/p/rfc3161-client
permissions:
# Used to sign the release's artifacts with sigstore-python.
# Used to publish to PyPI with Trusted Publishing.
id-token: write
steps:
- uses: actions/download-artifact@v4
- name: Publish to PyPI
uses: PyO3/maturin-action@v1
env:
MATURIN_PYPI_TOKEN: ${{ secrets.PYPI_API_TOKEN }}
with:
command: upload
args: --non-interactive --skip-existing wheels-*/*
path: dist/
DarkaMaul marked this conversation as resolved.
Show resolved Hide resolved
- name: Publish distributions
uses: pypa/gh-action-pypi-publish@release/v1
with:
attestations: true
verbose: true
DarkaMaul marked this conversation as resolved.
Show resolved Hide resolved
Loading