-
Notifications
You must be signed in to change notification settings - Fork 15
52 lines (43 loc) · 1.49 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
45
46
47
48
49
50
51
52
# See related documentation in https://github.com/anz-bank/sysl/blob/master/docs/releasing.md
name: Release
on:
push:
tags:
- 'v*.*.*'
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GOPROXY: ${{ vars.GOPROXY }}
jobs:
release-arrai:
name: Release Arr.ai
runs-on: ${{ vars.RUNNER_UBUNTU && fromJSON(vars.RUNNER_UBUNTU) || 'ubuntu-latest' }}
steps:
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: 1.21
- name: Check out code into the Go module directory
uses: actions/checkout@v4
with:
fetch-depth: '0'
- name: Install golangci-lint
run: |
go install github.com/golangci/golangci-lint/cmd/[email protected]
git restore go.mod go.sum
- name: Build
run: PATH=$PATH:$(go env GOPATH)/bin make all
- name: Validate goreleaser config
uses: goreleaser/goreleaser-action@v6
with:
version: latest
args: check -f .github/goreleaser_configs/goreleaser.yml
- name: Set GOVERSION env var
run: echo "GOVERSION=$(go version | awk '{print $3, $4;}')" >> $GITHUB_ENV
# Configured via `.github/goreleaser_config/.goreleaser.yml`
- name: Release binaries via goreleaser
uses: goreleaser/goreleaser-action@v6
with:
version: latest
args: release --clean --verbose -f .github/goreleaser_configs/goreleaser.yml
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}