Skip to content

Commit

Permalink
update publish-to-pypi.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
jeanollion committed May 15, 2024
1 parent 6806cb7 commit f5c2dc9
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions .github/workflows/publish-to-pypi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,15 @@ on: push
jobs:
build:
name: Build distribution 📦
if: startsWith(github.ref, 'refs/tags/') # only publish to PyPI on tag pushes
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: "3.x"
python-version: "3.10"
- name: Install pypa/build
run: >-
python3 -m
Expand All @@ -22,7 +23,7 @@ jobs:
- name: Build a binary wheel and a source tarball
run: python3 -m build
- name: Store the distribution packages
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: python-package-distributions
path: dist/
Expand Down Expand Up @@ -52,8 +53,9 @@ jobs:
name: >-
Sign the Python distribution 📦 with Sigstore
and upload them to GitHub Release
if: startsWith(github.ref, 'refs/tags/') # only publish to PyPI on tag pushes
needs:
- publish-to-pypi
- build
runs-on: ubuntu-latest

permissions:
Expand All @@ -67,9 +69,9 @@ jobs:
name: python-package-distributions
path: dist/
- name: Sign the dists with Sigstore
uses: sigstore/gh-action-sigstore-python@v1.2.3
uses: sigstore/gh-action-sigstore-python@v2.1.1
with:
inputs: >-
inputs: |
./dist/*.tar.gz
./dist/*.whl
- name: Create GitHub Release
Expand Down

0 comments on commit f5c2dc9

Please sign in to comment.