-
Notifications
You must be signed in to change notification settings - Fork 5
44 lines (37 loc) · 1020 Bytes
/
build-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: build-release
run-name: Create Github Release for Docker Image and Binary
on:
push:
tags:
- v*
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout Code
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Setup Go 1.21
uses: actions/setup-go@v2
with:
go-version: 1.21
- name: Download dependencies
run: go mod download
- name: Test
run: go test -v ./...
- name: Github Docker Login
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GH_PAT }}
- name: Build binaries, image and archive
uses: goreleaser/goreleaser-action@v4
if: success() && startsWith(github.ref, 'refs/tags/')
env:
GITHUB_TOKEN: ${{ secrets.GH_PAT }}
FURY_TOKEN: ${{ secrets.FURY_TOKEN }}
with:
version: latest
args: release --clean