Skip to content

Commit

Permalink
use upload-artifact GitHub Action to allow using dists between jobs
Browse files Browse the repository at this point in the history
  • Loading branch information
dchukhin committed Aug 13, 2024
1 parent 40752b3 commit d1f8521
Showing 1 changed file with 15 additions and 8 deletions.
23 changes: 15 additions & 8 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,11 @@ jobs:
run: pip install hatch
- name: Build a binary wheel and a source tarball
run: hatch build
- name: Store the distribution packages
uses: actions/upload-artifact@v4
with:
name: python-package-distributions
path: dist/

pypi-publish:
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/')
Expand All @@ -32,10 +37,11 @@ jobs:
permissions:
id-token: write
steps:
- name: Install hatch
run: pip install hatch
- name: Build a binary wheel and a source tarball
run: hatch build
- name: Download all the dists
uses: actions/download-artifact@v4
with:
name: python-package-distributions
path: dist/
- name: Publish distribution to PyPI
uses: pypa/gh-action-pypi-publish@release/v1

Expand All @@ -52,10 +58,11 @@ jobs:
id-token: write # IMPORTANT: mandatory for sigstore

steps:
- name: Install hatch
run: pip install hatch
- name: Build a binary wheel and a source tarball
run: hatch build
- name: Download all the dists
uses: actions/download-artifact@v4
with:
name: python-package-distributions
path: dist/
- name: Sign the dists with Sigstore
uses: sigstore/[email protected]
with:
Expand Down

0 comments on commit d1f8521

Please sign in to comment.