Skip to content

Commit

Permalink
Update publish.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
corpulent committed Apr 14, 2024
1 parent 54d209b commit cfe2d5e
Showing 1 changed file with 5 additions and 43 deletions.
48 changes: 5 additions & 43 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,8 @@ jobs:
publish-to-testpypi:
name: Publish distribution to TestPyPI
needs:
- build
- build
if: startsWith(github.ref, 'refs/tags/')
runs-on: ubuntu-latest

env:
Expand All @@ -57,9 +58,10 @@ jobs:
publish-to-pypi:
name: >-
Publish distribution
if: startsWith(github.ref, 'refs/tags/')
needs:
- build
- publish-to-testpypi
- build
if: startsWith(github.ref, 'refs/tags/')
runs-on: ubuntu-latest
env:
name: publish-to-pypi
Expand All @@ -77,43 +79,3 @@ jobs:
uses: pypa/gh-action-pypi-publish@release/v1
with:
password: ${{ secrets.PYPI_API_TOKEN }}

github-release:
name: >-
Sign the distribution
and upload them to GitHub Release
needs:
- publish-to-pypi
runs-on: ubuntu-latest

permissions:
contents: write
id-token: write

steps:
- name: Download all the dists
uses: actions/download-artifact@v3
with:
name: python-package-distributions
path: dist/
- name: Sign the dists with Sigstore
uses: sigstore/gh-action-sigstore-python@v1.2.3
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 }}'
--notes ""
- name: Upload artifact signatures to GitHub Release
env:
GITHUB_TOKEN: ${{ github.token }}
run: >-
gh release upload
'${{ github.ref_name }}' dist/**
--repo '${{ github.repository }}'

0 comments on commit cfe2d5e

Please sign in to comment.