Skip to content

Commit ef58693

Browse files
committed
build: add workflow
1 parent f6327f7 commit ef58693

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 Go
22+
uses: actions/setup-go@v2
23+
with:
24+
go-version: '~1.20'
25+
id: go
26+
- name: Set up QEMU
27+
uses: docker/setup-qemu-action@v1
28+
- name: Set up Docker Buildx
29+
id: buildx
30+
uses: docker/setup-buildx-action@v1
31+
- name: Check out code into the Go module directory
32+
uses: actions/checkout@v2
33+
with:
34+
lfs: true
35+
fetch-depth: 0
36+
- name: Checkout LFS objects
37+
run: git lfs checkout
38+
- name: Pull tag
39+
run: git fetch --tags
40+
- name: Run GoReleaser
41+
uses: goreleaser/goreleaser-action@v4
42+
with:
43+
version: latest
44+
args: release --rm-dist
45+
env:
46+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 commit comments

Comments
 (0)