-
Notifications
You must be signed in to change notification settings - Fork 28
77 lines (65 loc) · 1.95 KB
/
release.yml
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
name: Goreleaser
on:
push:
tags:
- "*"
permissions: read-all
jobs:
build-ui:
name: Build Treemap WebUI
permissions:
contents: write
uses: ./.github/workflows/build-webui.yml
with:
release: false
goreleaser:
name: Release
permissions:
contents: write
id-token: write
attestations: write
needs: build-ui
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
with:
fetch-depth: 0
- name: Get tags
run: git fetch --tags
- name: Setup Go
uses: actions/setup-go@cdcb36043654635271a94b9a6d1392de5bb323a7 # v5.0.1
with:
go-version: '1.23.0-rc.1'
cache: true
check-latest: true
- name: Download UI file
uses: actions/download-artifact@65a9edc5881444af0b9093a5e628f2fe47ea3b2e # v4.1.7
with:
name: ui
path: internal/webui
- name: Collect profiles
uses: ./.github/actions/setup-script
with:
cache: 'integration-real'
script: 'pgo.py'
- name: Download deps
run: go mod download
- name: Build and release
uses: goreleaser/goreleaser-action@286f3b13b1b49da4ac219696163fb8c1c93e1200 # v6.0.0
with:
distribution: goreleaser
version: latest
args: release --clean
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Attest build provenance
id: attest
uses: actions/attest-build-provenance@bdd51370e0416ac948727f861e03c2f05d32d78e # v1.3.2
with:
subject-path: 'dist/go-size-analyzer*.*'
- name: Upload build provenance
uses: svenstaro/upload-release-action@04733e069f2d7f7f0b4aebc4fbdbce8613b03ccd # v2.9.0
with:
asset_name: attestations.intoto.jsonl
file: ${{ steps.attest.outputs.bundle-path }}
overwrite: false