Skip to content

Commit 8b1a401

Browse files
authored
Store Artifacts to Share Between Jobs (#67)
* Store Artifacts to Share Between Jobs
1 parent 0fe6bdc commit 8b1a401

File tree

3 files changed

+13
-0
lines changed

3 files changed

+13
-0
lines changed

.github/workflows/package.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,3 +19,8 @@ jobs:
1919
python -m pip install -U build
2020
- name: Build Package
2121
run: python -m build
22+
- uses: actions/upload-artifact@v3
23+
with:
24+
name: dist_dir
25+
path: dist
26+
retention-days: 1

.github/workflows/publish_on_merge.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,12 @@ jobs:
99
prepare:
1010
uses: ./.github/workflows/package.yml
1111
publish:
12+
needs: prepare
1213
runs-on: ubuntu-latest
1314
steps:
15+
- uses: actions/download-artifact@v3
16+
with:
17+
name: dist_dir
1418
- name: Publish the Package on TestPyPI
1519
uses: pypa/gh-action-pypi-publish@release/v1
1620
with:

.github/workflows/publish_on_release.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,12 @@ jobs:
99
prepare:
1010
uses: ./.github/workflows/package.yml
1111
publish:
12+
needs: prepare
1213
runs-on: ubuntu-latest
1314
steps:
15+
- uses: actions/download-artifact@v3
16+
with:
17+
name: dist_dir
1418
- name: Publish the Package
1519
if: startsWith(github.ref, 'refs/tags')
1620
uses: pypa/gh-action-pypi-publish@release/v1

0 commit comments

Comments
 (0)