Skip to content

Commit

Permalink
action: upload artifact being signed for (#55)
Browse files Browse the repository at this point in the history
* action: upload artifact being signed for

Signed-off-by: Andrew Pan <a@tny.town>

* workflows/selftest: confirm presence of artifacts

Signed-off-by: Andrew Pan <a@tny.town>

---------

Signed-off-by: Andrew Pan <a@tny.town>
  • Loading branch information
tnytown authored Mar 23, 2023
1 parent be1f074 commit 3548791
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 0 deletions.
11 changes: 11 additions & 0 deletions .github/workflows/selftest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,17 @@ jobs:
inputs: ./test/artifact.txt
staging: true
upload-signing-artifacts: true
- uses: actions/download-artifact@v3
with:
name: "signing-artifacts-${{ github.job }}"
path: ./test/uploaded
- name: Verify presence of uploaded files
run: |
[[ -f ./artifact.txt ]] || exit 1
[[ -f ./artifact.txt.sig ]] || exit 1
[[ -f ./artifact.txt.crt ]] || exit 1
[[ -f ./artifact.txt.sigstore ]] || exit 1
working-directory: ./test/uploaded

selftest-custom-paths:
runs-on: ubuntu-latest
Expand Down
4 changes: 4 additions & 0 deletions action.py
Original file line number Diff line number Diff line change
Expand Up @@ -200,6 +200,10 @@ def _fatal_help(msg):
for file_ in files:
if not file_.is_file():
_fatal_help(f"input {file_} does not look like a file")

# Also upload artifact being signed for.
signing_artifact_paths.append(file_)

if not bundle_only and "--certificate" not in sigstore_sign_args:
signing_artifact_paths.append(f"{file_}.crt")
if not bundle_only and "--signature" not in sigstore_sign_args:
Expand Down

0 comments on commit 3548791

Please sign in to comment.