-
Notifications
You must be signed in to change notification settings - Fork 25
42 lines (35 loc) · 898 Bytes
/
release.yml
File metadata and controls
42 lines (35 loc) · 898 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
42
name: Release
on:
release:
types:
- created
permissions:
contents: read
packages: write
env:
REGISTRY: ghcr.io
jobs:
goreleaser:
name: Build binary and Docker image
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v6
- name: Setup Golang
uses: actions/setup-go@v6
with:
go-version: '^1.17'
- name: Log in to the Container registry
uses: docker/login-action@v3
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Run GoReleaser
uses: goreleaser/goreleaser-action@v6
if: success() && startsWith(github.ref, 'refs/tags/')
with:
version: v1.2.2
args: release --rm-dist
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}