-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
83489f3
commit 79ce3ad
Showing
1 changed file
with
8 additions
and
8 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,8 @@ | ||
name: Publish to PyPI | ||
|
||
on: | ||
push: | ||
release: | ||
types: [ published ] | ||
branches: [ main ] | ||
workflow_dispatch: | ||
|
||
|
@@ -20,7 +21,7 @@ jobs: | |
python-version: "3.x" | ||
|
||
- name: Install pypa/build | ||
run: >- | ||
run: | | ||
python3 -m | ||
pip install | ||
build | ||
|
@@ -34,9 +35,8 @@ jobs: | |
path: dist/ | ||
|
||
publish-to-pypi: | ||
name: >- | ||
name: | | ||
Publish Python distribution to PyPI | ||
if: startsWith(github.ref, 'refs/tags/') # only publish to PyPI on tag pushes | ||
needs: | ||
- build | ||
runs-on: ubuntu-latest | ||
|
@@ -55,7 +55,7 @@ jobs: | |
uses: pypa/gh-action-pypi-publish@release/v1 | ||
|
||
github-release: | ||
name: >- | ||
name: | | ||
Sign the Python 🐍 distribution 📦 with Sigstore | ||
and upload them to GitHub Release | ||
needs: | ||
|
@@ -75,13 +75,13 @@ jobs: | |
- name: Sign the dists with Sigstore | ||
uses: sigstore/[email protected] | ||
with: | ||
inputs: >- | ||
inputs: | | ||
./dist/*.tar.gz | ||
./dist/*.whl | ||
- name: Create GitHub Release | ||
env: | ||
GITHUB_TOKEN: ${{ github.token }} | ||
run: >- | ||
run: | | ||
gh release create | ||
'${{ github.ref_name }}' | ||
--repo '${{ github.repository }}' | ||
|
@@ -92,7 +92,7 @@ jobs: | |
# Upload to GitHub Release using the `gh` CLI. | ||
# `dist/` contains the built packages, and the | ||
# sigstore-produced signatures and certificates. | ||
run: >- | ||
run: | | ||
gh release upload | ||
'${{ github.ref_name }}' dist/** | ||
--repo '${{ github.repository }}' | ||
|