Skip to content

Commit 6b2cc8f

Browse files
authored
Create sign-release.yml
Signed-off-by: David Osipov <[email protected]>
1 parent 75a8c95 commit 6b2cc8f

File tree

1 file changed

+53
-0
lines changed

1 file changed

+53
-0
lines changed

.github/workflows/sign-release.yml

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
name: Sign Release Artifacts
2+
3+
on:
4+
release:
5+
types: [created] # Trigger only when a new release is *created*
6+
7+
permissions:
8+
contents: write # Needed to upload release assets
9+
id-token: write # Needed for OIDC authentication with Sigstore
10+
11+
jobs:
12+
sign:
13+
runs-on: ubuntu-latest
14+
steps:
15+
- uses: actions/checkout@v4
16+
with:
17+
persist-credentials: false # Avoid keeping credentials around longer than needed
18+
19+
- name: Set up Python # This step is CRUCIAL
20+
uses: actions/setup-python@v4
21+
with:
22+
python-version: '3.10' # Or another supported version, matching your project
23+
24+
- name: Install dependencies (including your package in editable mode)
25+
run: |
26+
python -m pip install --upgrade pip
27+
pip install -e . # Install your package (so it's available to the signing action)
28+
29+
- name: Sign Script with Sigstore
30+
uses: sigstore/[email protected]
31+
with:
32+
inputs: feldman_vss.py
33+
README.md
34+
LICENSE
35+
# Optional: Sign other files too, e.g., a README or LICENSE
36+
# inputs: |
37+
# feldman_vss.py
38+
# README.md
39+
# LICENSE
40+
release-signing-artifacts: true # Upload signatures as release assets
41+
upload-signing-artifacts: true # Also upload as workflow artifacts (for debugging)
42+
43+
# Optional: Verify the signature (good practice)
44+
- name: Verify Signature
45+
if: always() # Run verification even if signing fails (for diagnostics)
46+
uses: sigstore/[email protected]
47+
with:
48+
inputs: feldman_vss_current.py
49+
verify: true
50+
# We know the identity because it will be the GitHub Actions bot.
51+
# The format is {actor}@users.noreply.github.com
52+
verify-cert-identity: ${{ github.actor }}@users.noreply.github.com
53+
verify-oidc-issuer: https://token.actions.githubusercontent.com

0 commit comments

Comments
 (0)