Skip to content

Commit 3548791

Browse files
authored
action: upload artifact being signed for (#55)
* action: upload artifact being signed for Signed-off-by: Andrew Pan <[email protected]> * workflows/selftest: confirm presence of artifacts Signed-off-by: Andrew Pan <[email protected]> --------- Signed-off-by: Andrew Pan <[email protected]>
1 parent be1f074 commit 3548791

File tree

2 files changed

+15
-0
lines changed

2 files changed

+15
-0
lines changed

.github/workflows/selftest.yml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,17 @@ jobs:
9595
inputs: ./test/artifact.txt
9696
staging: true
9797
upload-signing-artifacts: true
98+
- uses: actions/download-artifact@v3
99+
with:
100+
name: "signing-artifacts-${{ github.job }}"
101+
path: ./test/uploaded
102+
- name: Verify presence of uploaded files
103+
run: |
104+
[[ -f ./artifact.txt ]] || exit 1
105+
[[ -f ./artifact.txt.sig ]] || exit 1
106+
[[ -f ./artifact.txt.crt ]] || exit 1
107+
[[ -f ./artifact.txt.sigstore ]] || exit 1
108+
working-directory: ./test/uploaded
98109

99110
selftest-custom-paths:
100111
runs-on: ubuntu-latest

action.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -200,6 +200,10 @@ def _fatal_help(msg):
200200
for file_ in files:
201201
if not file_.is_file():
202202
_fatal_help(f"input {file_} does not look like a file")
203+
204+
# Also upload artifact being signed for.
205+
signing_artifact_paths.append(file_)
206+
203207
if not bundle_only and "--certificate" not in sigstore_sign_args:
204208
signing_artifact_paths.append(f"{file_}.crt")
205209
if not bundle_only and "--signature" not in sigstore_sign_args:

0 commit comments

Comments
 (0)