-
Notifications
You must be signed in to change notification settings - Fork 2
43 lines (41 loc) · 1 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
name: goreleaser
on:
push:
branches:
- main
jobs:
goreleaser:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
-
name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: 0
-
name: Set up Go
uses: actions/setup-go@v4
with:
go-version: 1.18
-
name: Create tag
id: create-tag
run: |
echo 'deb [trusted=yes] https://apt.fury.io/caarlos0/ /' | sudo tee /etc/apt/sources.list.d/caarlos0.list
sudo apt update
sudo apt install svu
echo "::set-output name=Version::$(svu p)"
git tag "$(svu p)"
git push --tags
-
name: Run GoReleaser
uses: goreleaser/goreleaser-action@v5
with:
distribution: goreleaser
version: 1.25.1
args: release --rm-dist
env:
GITHUB_TOKEN: ${{ secrets.TOKEN }}
Version: ${{ steps.create-tag.outputs.Version }}