-
Notifications
You must be signed in to change notification settings - Fork 1
44 lines (41 loc) · 1.04 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
44
---
name: release
on:
push:
tags:
- v*
env:
GOVER: 1.21.3
GORELEASER_VER: v1.19.2
jobs:
test:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v4
with:
go-version: ${{ env.GOVER }}
- run: go test -cover ./...
env:
CGO_ENABLED: 0
release:
runs-on: ubuntu-22.04
needs:
- test
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v4
with:
go-version: ${{ env.GOVER }}
- name: Configure git for private modules
env:
TOKEN: ${{ secrets.PERSONAL_ACCESS_TOKEN }}
run: git config --global url."https://karimra:${TOKEN}@github.com".insteadOf "https://github.com"
- name: Release with goreleaser
uses: goreleaser/goreleaser-action@v5
with:
version: ${{ env.GORELEASER_VER }}
args: release --clean -f .goreleaser.yml
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
FURY_TOKEN: ${{ secrets.FURY_TOKEN }}