Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

action: upload artifact being signed for #55

Merged
merged 2 commits into from
Mar 23, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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