-
Notifications
You must be signed in to change notification settings - Fork 0
76 lines (64 loc) · 1.98 KB
/
Copy pathrelease.yml
File metadata and controls
76 lines (64 loc) · 1.98 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
name: Release
on:
push:
tags:
- 'v*'
permissions:
contents: write
id-token: write # Sigstore keyless signing
jobs:
release:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: actions/setup-go@v5
with:
go-version: '1.23'
- name: Run tests
run: make test
# GoReleaser builds cross-platform binaries and creates the GitHub release
- uses: goreleaser/goreleaser-action@v6
with:
version: '~> v2'
args: release --clean
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
HOMEBREW_TAP_GITHUB_TOKEN: ${{ secrets.HOMEBREW_TAP_GITHUB_TOKEN }}
# Dogfood: full pipeline against reference project + sign the binary
- name: Build forgeseal for dogfooding
run: make build
- name: Run full pipeline on reference project
run: |
./bin/forgeseal pipeline \
--dir ./examples/hono-app \
--output-dir ./forgeseal-output \
--sign \
--attest \
--vex-triage
- name: Sign forgeseal binary
run: |
./bin/forgeseal sign \
--artifact ./bin/forgeseal \
--bundle ./forgeseal-output/forgeseal.sigstore.json
- name: Attest forgeseal binary
run: |
./bin/forgeseal attest \
--subject ./bin/forgeseal \
--sign \
-o ./forgeseal-output/forgeseal.intoto.jsonl
- name: Upload supply chain artifacts
uses: actions/upload-artifact@v4
with:
name: forgeseal-supply-chain
path: ./forgeseal-output/
# Attach all artifacts to the GitHub release
- name: Attach artifacts to release
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
tag="${GITHUB_REF#refs/tags/}"
for f in ./forgeseal-output/*; do
gh release upload "$tag" "$f" --clobber
done