-
Notifications
You must be signed in to change notification settings - Fork 0
58 lines (48 loc) · 1.36 KB
/
release.yml
File metadata and controls
58 lines (48 loc) · 1.36 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
name: release
on:
push:
tags:
- "*"
permissions:
attestations: write
contents: write
id-token: write
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Fetch all tags
run: git fetch --force --tags
- name: Setup Go
uses: actions/setup-go@v5
with:
go-version-file: go.mod
- name: Install Snapcraft
uses: samuelmeuli/action-snapcraft@v2
- name: Prevent from snapcraft fail
run: |
mkdir -p $HOME/.cache/snapcraft/download
mkdir -p $HOME/.cache/snapcraft/stage-packages
- name: Run GoReleaser
uses: goreleaser/goreleaser-action@v6
with:
distribution: goreleaser
version: 'v2.10.2'
args: release --clean --verbose
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SNAPCRAFT_STORE_CREDENTIALS: ${{ secrets.SNAPCRAFT_STORE_CREDENTIALS }}
- name: Generate artifact attestations
uses: actions/attest-build-provenance@v3
with:
subject-checksums: dist/commitizen_checksums.txt
- name: Preserve artifacts permissions with tar
run: tar -cvf dist.tar dist/
- uses: actions/upload-artifact@v4
with:
name: dist
path: dist.tar