Skip to content

Commit

Permalink
Merge pull request #86 from SmithChart/disable-attestations
Browse files Browse the repository at this point in the history
CI: Split production and test releases into different jobs + disable attestation for production releases
  • Loading branch information
SmithChart authored Nov 5, 2024
2 parents 7ae1535 + c5447a6 commit 051f381
Showing 1 changed file with 23 additions and 3 deletions.
26 changes: 23 additions & 3 deletions .github/workflows/check-and-publish.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,8 @@ jobs:
name: dist
path: dist

publish:
name: Publish
publish-test:
name: Publish to test.pypi.org
if: ${{ github.event_name == 'push' && vars.PUBLISH_PYPI == 'true' && (startsWith(github.ref, 'refs/tags') || github.ref == 'refs/heads/master') }}
runs-on: ubuntu-latest
needs:
Expand All @@ -59,6 +59,26 @@ jobs:
uses: pypa/gh-action-pypi-publish@release/v1
with:
repository-url: https://test.pypi.org/legacy/

publish-production:
name: Publish
if: ${{ github.event_name == 'push' && vars.PUBLISH_PYPI == 'true' && startsWith(github.ref, 'refs/tags') }}
runs-on: ubuntu-latest
needs:
- codespell
- pytest
- ruff
- build
- publish-test
permissions:
id-token: write
steps:
- name: Download artifacts from build stage
uses: actions/download-artifact@v4
with:
name: dist
path: dist/
- name: Publish distribution package to PyPI
if: ${{ startsWith(github.ref, 'refs/tags') }}
uses: pypa/gh-action-pypi-publish@release/v1
with:
attestations: false

0 comments on commit 051f381

Please sign in to comment.