Skip to content

Commit d1f8521

Browse files
committed
use upload-artifact GitHub Action to allow using dists between jobs
1 parent 40752b3 commit d1f8521

File tree

1 file changed

+15
-8
lines changed

1 file changed

+15
-8
lines changed

.github/workflows/build.yml

Lines changed: 15 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,11 @@ jobs:
2020
run: pip install hatch
2121
- name: Build a binary wheel and a source tarball
2222
run: hatch build
23+
- name: Store the distribution packages
24+
uses: actions/upload-artifact@v4
25+
with:
26+
name: python-package-distributions
27+
path: dist/
2328

2429
pypi-publish:
2530
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/')
@@ -32,10 +37,11 @@ jobs:
3237
permissions:
3338
id-token: write
3439
steps:
35-
- name: Install hatch
36-
run: pip install hatch
37-
- name: Build a binary wheel and a source tarball
38-
run: hatch build
40+
- name: Download all the dists
41+
uses: actions/download-artifact@v4
42+
with:
43+
name: python-package-distributions
44+
path: dist/
3945
- name: Publish distribution to PyPI
4046
uses: pypa/gh-action-pypi-publish@release/v1
4147

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

5460
steps:
55-
- name: Install hatch
56-
run: pip install hatch
57-
- name: Build a binary wheel and a source tarball
58-
run: hatch build
61+
- name: Download all the dists
62+
uses: actions/download-artifact@v4
63+
with:
64+
name: python-package-distributions
65+
path: dist/
5966
- name: Sign the dists with Sigstore
6067
uses: sigstore/gh-action-sigstore-python@v2.1.1
6168
with:

0 commit comments

Comments
 (0)