-
Notifications
You must be signed in to change notification settings - Fork 2
44 lines (40 loc) · 1014 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
40
41
42
43
44
name: goreleaser
on:
push:
branches:
- main
workflow_dispatch:
jobs:
goreleaser:
runs-on: ubuntu-latest
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.8.3
args: release --clean
env:
GITHUB_TOKEN: ${{ secrets.TOKEN }}
Version: ${{ steps.create-tag.outputs.Version }}