-
Notifications
You must be signed in to change notification settings - Fork 4
49 lines (41 loc) · 1.06 KB
/
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
45
46
47
48
49
name: build-release
run-name: Create Github Release for Docker Image and Binary
on:
push:
tags:
- v*
permissions:
contents: write
id-token: write
packages: write
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout Code
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Setup Go 1.23
uses: actions/setup-go@v2
with:
go-version: 1.23
- 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@v5
if: success() && startsWith(github.ref, 'refs/tags/')
env:
GITHUB_TOKEN: ${{ secrets.GH_PAT }}
FURY_TOKEN: ${{ secrets.FURY_TOKEN }}
with:
version: latest
args: release --clean