-
-
Notifications
You must be signed in to change notification settings - Fork 16
50 lines (42 loc) · 1.2 KB
/
vendored-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
name: Release
on:
workflow_dispatch
push:
tags:
- 'v*'
jobs:
build:
runs-on: ubuntu-latest
permissions:
contents: write # to upload assets to releases
attestations: write # to upload assets attestation for build provenance
id-token: write # grant additional permission to attestation action to mint the OIDC token permission
steps:
- uses: actions/checkout@v4
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: 1.22
- name: Vendor dependencies
run: |
go get
go mod vendor
tar cvf vib-vendored-deps.tar.xz *
- name: Upload artifact
uses: actions/upload-artifact@v4
with:
Name: Vendored Sources
path: vib-vendored-deps.tar.xz
- name: Upload a Release Asset
if: github.repository == 'Vanilla-OS/Vib'
if: startsWith(github.ref, 'ref/tags')
uses: softprops/action-gh-release@v2
with:
files: vib-vendored-deps.tar.xz
- name: Attest generated files
if: github.repository == 'Vanilla-OS/Vib'
if startsWith(github.ref, 'ref/tags')
id: attest
uses: actions/attest-build-provenance@v1
with:
subject-path: 'vib-vendored-deps.tar.xz'