Skip to content

Commit 021d70f

Browse files
committed
add workflow
1 parent 9ac836b commit 021d70f

File tree

1 file changed

+46
-0
lines changed

1 file changed

+46
-0
lines changed

.github/workflows/release.yaml

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
name: Build and release
2+
on:
3+
push:
4+
tags:
5+
- 'v*'
6+
7+
env:
8+
REGISTRY: ghcr.io
9+
10+
jobs:
11+
build:
12+
name: Build
13+
runs-on: ubuntu-latest
14+
steps:
15+
- name: Log in to the Container registry
16+
uses: docker/login-action@f054a8b539a109f9f41c372932f1ae047eff08c9
17+
with:
18+
registry: ${{ env.REGISTRY }}
19+
username: ${{ github.actor }}
20+
password: ${{ secrets.GITHUB_TOKEN }}
21+
- name: Set up QEMU
22+
uses: docker/setup-qemu-action@v1
23+
- name: Set up Docker Buildx
24+
id: buildx
25+
uses: docker/setup-buildx-action@v1
26+
- name: Check out code into the Go module directory
27+
uses: actions/checkout@v4
28+
with:
29+
lfs: true
30+
fetch-depth: 0
31+
- name: Checkout LFS objects
32+
run: git lfs checkout
33+
- name: Pull tag
34+
run: git fetch --tags
35+
- name: Set up Go
36+
uses: actions/setup-go@v5
37+
with:
38+
go-version-file: go.mod
39+
id: go
40+
- name: Run GoReleaser
41+
uses: goreleaser/goreleaser-action@v6
42+
with:
43+
version: latest
44+
args: release --clean
45+
env:
46+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 commit comments

Comments
 (0)