-
Notifications
You must be signed in to change notification settings - Fork 4
55 lines (46 loc) · 1.33 KB
/
release.yml
File metadata and controls
55 lines (46 loc) · 1.33 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
name: goreleaser
on:
push:
tags:
- 'v*'
jobs:
goreleaser:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v5
with:
fetch-depth: 0
- name: Set up Go
uses: actions/setup-go@v4
with:
go-version: "1.24"
- name: Install Snapcraft
uses: samuelmeuli/action-snapcraft@v2
# This gives us more disk space to produce the release
- name: Free disk space
run: |
sudo rm -rf /usr/share/dotnet
sudo rm -rf /opt/ghc
sudo rm -rf /usr/local/lib/android
sudo apt-get clean
df -h
- name: Find version
id: version
run: echo "CLI_VERSION=${GITHUB_REF#refs/tags/v}" >> $GITHUB_ENV
- id: app-token
uses: actions/create-github-app-token@v2
with:
app-id: ${{ vars.BOT_APP_ID }}
private-key: ${{ secrets.BOT_PRIVATE_KEY }}
- name: Download go modules
run: go mod download
- name: Run GoReleaser
uses: goreleaser/goreleaser-action@v4
with:
version: latest
args: release --clean
env:
GITHUB_TOKEN: ${{ steps.app-token.outputs.token }}
CLI_VERSION: ${{ env.MODULE_VERSION }}
SNAPCRAFT_STORE_CREDENTIALS: ${{ secrets.SNAPCRAFT_TOKEN }}