Skip to content

Commit 1b3ff7c

Browse files
Refactor release script, add test run and document new attestation
1 parent d78d438 commit 1b3ff7c

3 files changed

Lines changed: 77 additions & 18 deletions

File tree

.github/workflows/release.yml

Lines changed: 12 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,15 @@ permissions:
1212
attestations: write
1313

1414
jobs:
15+
test:
16+
uses: ./.github/workflows/test.yml
17+
1518
build:
19+
needs: test
1620
runs-on: ubuntu-latest
21+
env:
22+
BUILD_PROJECT: src/ucll.build/ucll.build.csproj
23+
ARTIFACTS_PATH: src/ucll.build/bin/artifacts/*
1724

1825
steps:
1926
- name: Checkout repository
@@ -25,40 +32,30 @@ jobs:
2532
dotnet-version: '10.0.x'
2633

2734
- name: Build ucll.build tool
28-
run: dotnet build src/ucll.build/ucll.build.csproj
35+
run: dotnet build ${{ env.BUILD_PROJECT }}
2936

3037
- name: Run ucll.build to create release artifacts
3138
env:
3239
SKIP_GPG_SIGNING: 'true'
33-
run: dotnet run --project src/ucll.build/ucll.build.csproj --no-build
34-
35-
- name: List artifacts
36-
run: ls -lah src/ucll.build/bin/artifacts/
40+
run: dotnet run --project ${{ env.BUILD_PROJECT }} --no-build
3741

3842
- name: Upload artifacts
3943
uses: actions/upload-artifact@v4
4044
with:
4145
name: release-artifacts
42-
path: src/ucll.build/bin/artifacts/*
46+
path: ${{ env.ARTIFACTS_PATH }}
4347
if-no-files-found: error
4448

4549
- name: Attest build provenance
4650
uses: actions/attest-build-provenance@v3
4751
with:
48-
subject-path: src/ucll.build/bin/artifacts/*
52+
subject-path: ${{ env.ARTIFACTS_PATH }}
4953

5054
- name: Create GitHub Release
5155
uses: softprops/action-gh-release@v2
5256
if: startsWith(github.ref, 'refs/tags/')
5357
with:
54-
files: |
55-
src/ucll.build/bin/artifacts/ucll-osx-arm64.tar.gz
56-
src/ucll.build/bin/artifacts/ucll-osx-x64.tar.gz
57-
src/ucll.build/bin/artifacts/ucll-linux-arm64.tar.gz
58-
src/ucll.build/bin/artifacts/ucll-linux-x64.tar.gz
59-
src/ucll.build/bin/artifacts/ucll-win-arm64.zip
60-
src/ucll.build/bin/artifacts/ucll-win-x64.zip
61-
src/ucll.build/bin/artifacts/SHA256SUMS
58+
files: ${{ env.ARTIFACTS_PATH }}
6259
generate_release_notes: true
6360
prerelease: true
6461
draft: true

.github/workflows/test.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ on:
44
pull_request:
55
branches: [ "main" ]
66
workflow_dispatch:
7+
workflow_call:
78

89
jobs:
910
test:

Security.md

Lines changed: 64 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,11 @@
11
# Security
22

3-
Commits and releases are cryptographically signed with my (Chris Yarbrough's) GPG key `F744D8C299C05EAA` to ensure authenticity.
3+
Commits and releases are cryptographically signed to ensure authenticity.
44

5-
> If you would like to contribute to this repo, you may optionally also sign your commits, but it's not a requirements, since I will be vetting each pull request anyway.
5+
- **Commits**: Signed with my (Chris Yarbrough's) GPG key `F744D8C299C05EAA`
6+
- **Release Artifacts** (v0.3.0+): Signed with GitHub's build provenance attestations using Sigstore
7+
8+
> If you would like to contribute to this repo, you may optionally also sign your commits, but it's not a requirement, since I will be vetting each pull request anyway.
69
710
Continue reading to learn how you can verify the repository and release artifacts.
811

@@ -34,7 +37,65 @@ Verify the integrity of this guide by comparing the key ID and fingerprint throu
3437
- This guide.
3538
- The public source of trust.
3639

37-
## Verify Binaries
40+
## Verify Binaries (Recommended: v0.3.0+)
41+
42+
Starting with v0.3.0, releases include cryptographic build provenance attestations that prove the artifacts were built by the official GitHub Actions workflow. This verification method is more secure and easier than GPG verification.
43+
44+
### Prerequisites
45+
46+
Install the GitHub CLI:
47+
```shell
48+
# macOS
49+
brew install gh
50+
51+
# Linux (Debian/Ubuntu)
52+
sudo apt install gh
53+
54+
# Windows
55+
winget install GitHub.cli
56+
```
57+
58+
Authenticate with GitHub:
59+
```shell
60+
gh auth login
61+
```
62+
63+
### Verification Steps
64+
65+
1. Download a release artifact:
66+
```shell
67+
gh release download v0.3.0 --pattern "ucll-osx-arm64.tar.gz" --repo chrisyarbrough/UnityCommandLineLauncher
68+
```
69+
70+
2. Verify the attestation:
71+
```shell
72+
gh attestation verify ucll-osx-arm64.tar.gz --owner chrisyarbrough
73+
```
74+
75+
3. Successful verification confirms:
76+
- ✓ The artifact was built by the official GitHub Actions workflow
77+
- ✓ The artifact matches the exact commit SHA in the repository
78+
- ✓ The build process is cryptographically signed and logged in Sigstore's transparency log
79+
- ✓ No tampering occurred after the build
80+
81+
### What the Attestation Proves
82+
83+
The build provenance attestation includes:
84+
- **Repository**: chrisyarbrough/UnityCommandLineLauncher
85+
- **Workflow**: .github/workflows/release.yml
86+
- **Commit SHA**: The exact Git commit that produced this artifact
87+
- **Build Environment**: GitHub-hosted runner details
88+
- **Transparency Log**: Public Sigstore Rekor entry (searchable at https://search.sigstore.dev)
89+
90+
This provides stronger security guarantees than traditional GPG signatures because:
91+
- The signing key is tied to the GitHub repository (not a personal GPG key)
92+
- The entire build process is attested, not just the final artifact
93+
- Signatures are logged in a public, tamper-proof transparency log
94+
- Verification doesn't require trusting or importing external keys
95+
96+
## Verify Binaries (Legacy: GPG Method)
97+
98+
For older releases (pre-v0.3.0) or builds that were created locally:
3899

39100
1. Import my public key:
40101
```shell

0 commit comments

Comments
 (0)