-
Notifications
You must be signed in to change notification settings - Fork 14
51 lines (49 loc) · 1.57 KB
/
release.yaml
File metadata and controls
51 lines (49 loc) · 1.57 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
name: Release CLI
on:
push:
tags:
- 'v*.*.*'
jobs:
release:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v5
with:
fetch-depth: "0"
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: 1.23
- name: Build CLI
run: |
go install go.uber.org/mock/mockgen@v0.4.0
make deps
make test
- name: Compile CLI
run: |
make VERSION="${GITHUB_REF##*/}" build-linux
make VERSION="${GITHUB_REF##*/}" build-darwin
# create the archived versions and remove anything not required for the release
rm ./builds/README.md ./builds/release_template.md
for BUILD in builds/*; do tar --transform="flags=r;s|${BUILD#builds/}|lagoon|" -czf "$BUILD.tar.gz" -C builds "${BUILD#builds/}"; done
- name: Generate SBOM from Github API
uses: advanced-security/sbom-generator-action@6fe43abf522b2e7a19bc769aec1e6c848614b517 # v0.0.2
id: sbom
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Move SBOM to avoid dirty git
run: mv "$GITHUB_SBOM_PATH" ./sbom.spdx.json
env:
GITHUB_SBOM_PATH: ${{ steps.sbom.outputs.fileName }}
- name: Create GitHub Release
uses: softprops/action-gh-release@v2
if: startsWith(github.ref, 'refs/tags/')
with:
files: |
builds/*
sbom.spdx.json
- name: Attest build provenance
uses: actions/attest-build-provenance@db473fddc028af60658334401dc6fa3ffd8669fd # v2.3.0
with:
subject-path: "builds/*"