Skip to content

Commit

Permalink
Merge pull request #26 from trailofbits/dm/publish-workflow
Browse files Browse the repository at this point in the history
Add a Publishing workflow
  • Loading branch information
DarkaMaul authored Oct 18, 2024
2 parents 23ab7f3 + d5abcc1 commit 97da5e4
Showing 1 changed file with 19 additions and 9 deletions.
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/
merge-multiple: true
- name: Publish distributions
uses: pypa/gh-action-pypi-publish@release/v1
with:
attestations: true

0 comments on commit 97da5e4

Please sign in to comment.