-
-
Notifications
You must be signed in to change notification settings - Fork 72
39 lines (32 loc) · 869 Bytes
/
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
name: release
on:
push:
tags:
- "v*"
jobs:
goreleaser:
runs-on: ubuntu-latest
SNAPCRAFT_STORE_CREDENTIALS: ${{ secrets.SNAPCRAFT_TOKEN }}
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Unshallow
run: git fetch --prune --unshallow
- name: Set up Go 1.20
uses: actions/setup-go@v1
with:
go-version: 1.20
id: go
- name: Set Envs
run: |
echo GO_VERSION=$(go version | awk '{print $3;}') >> $GITHUB_ENV
- name: Login to Snapcraft
uses: samuelmeuli/action-snapcraft@v2
- name: Run GoReleaser
uses: goreleaser/goreleaser-action@v1
with:
version: latest
args: release --clean
env:
GITHUB_TOKEN: ${{ secrets.TOKEN }}
GO_VERSION: ${{ env.GITHUB_GO_VERSION }}