-
Notifications
You must be signed in to change notification settings - Fork 1
41 lines (33 loc) · 904 Bytes
/
main.yml
File metadata and controls
41 lines (33 loc) · 904 Bytes
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
name: Main
on: push
permissions:
contents: write
jobs:
test_publish:
name: Test and publish
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- name: Checkout code
uses: actions/checkout@v3
with:
fetch-depth: 0 # Needed to describe git ref during build.
- name: Export GOBIN
uses: actions/setup-go@v4
with:
go-version: '1.24.0'
- name: Install dependencies
run: make setup
- name: Run tests
run: make test
- name: Build
run: make build
- name: Run GoReleaser
uses: goreleaser/goreleaser-action@v4
if: startsWith(github.ref, 'refs/tags/v') # Only release for tagged commits.
with:
distribution: goreleaser
version: latest
args: release --rm-dist
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}