Skip to content

Commit 46e939b

Browse files
GrantBirkisigmavirus24
authored andcommitted
Update publish workflow to use artifact-id instead of name
Added artifact-id output to publish workflow and updated download-artifact action version to `v5.0.0`. Also hardens the workflow a bit by adding `persist-credentials: false` to the checkout step
1 parent 4b9c546 commit 46e939b

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

.github/workflows/publish.yml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ jobs:
1616
name: "publish"
1717
outputs:
1818
hashes: ${{ steps.hash.outputs.hashes }}
19+
artifact-id: ${{ steps.upload-artifact.outputs.artifact-id }}
1920

2021
steps:
2122
- name: Harden the runner (Audit all outbound calls)
@@ -25,6 +26,8 @@ jobs:
2526

2627
- name: "Checkout repository"
2728
uses: "actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683"
29+
with:
30+
persist-credentials: false
2831

2932
- name: "Setup Python"
3033
uses: "actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065"
@@ -46,6 +49,7 @@ jobs:
4649
4750
- name: "Upload dists"
4851
uses: "actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02"
52+
id: upload-artifact
4953
with:
5054
name: "dist"
5155
path: "dist/"
@@ -80,9 +84,9 @@ jobs:
8084
egress-policy: audit
8185

8286
- name: "Download dists"
83-
uses: "actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093"
87+
uses: "actions/download-artifact@634f93cb2916e3fdff6788551b99b062d0335ce0" # v5.0.0
8488
with:
85-
name: "dist"
89+
artifact-ids: ${{ needs.build.outputs.artifact-id }}
8690
path: "dist/"
8791

8892
- name: "Publish dists to PyPI"

0 commit comments

Comments
 (0)