-
Notifications
You must be signed in to change notification settings - Fork 0
96 lines (81 loc) · 2.72 KB
/
Copy pathrelease.yml
File metadata and controls
96 lines (81 loc) · 2.72 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
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
name: Release
on:
push:
tags:
- 'v*'
permissions:
contents: write
packages: write # push the container image to GHCR
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
- name: Log in to GHCR
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
# GoReleaser builds cross-platform binaries, the container image, and the GitHub release
- name: Install GoReleaser
uses: goreleaser/goreleaser-action@v6
with:
version: '~> v2'
install-only: true
- name: Install Doppler CLI
uses: dopplerhq/cli-action@v3
- name: GoReleaser release (Homebrew tap token via Doppler)
run: |
# dopplerhq/cli-action installs the doppler binary into ./bin, which
# would make the tree dirty and abort goreleaser. Hide it from git's
# dirty check without a tracked change.
printf 'bin/\n' >> "$(git rev-parse --git-dir)/info/exclude"
doppler run -- goreleaser release --clean
env:
DOPPLER_TOKEN: ${{ secrets.DOPPLER_TOKEN }}
GITHUB_TOKEN: ${{ secrets.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