-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
use upload-artifact GitHub Action to allow using dists between jobs
- Loading branch information
Showing
1 changed file
with
15 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 |
---|---|---|
|
@@ -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/') | ||
|
@@ -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 | ||
|
||
|
@@ -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: | ||
|