-
Notifications
You must be signed in to change notification settings - Fork 3
48 lines (42 loc) · 1.08 KB
/
release.yml
File metadata and controls
48 lines (42 loc) · 1.08 KB
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
name: Release
run-name: Release - ${{ github.ref_name }} - ${{ github.sha }}
on:
push:
tags:
- "v*"
env:
GO_VERSION: 1.22
jobs:
release:
runs-on: ubuntu-latest
permissions:
contents: write
packages: write
attestations: write
id-token: write
steps:
- name: Check out the repository
uses: actions/checkout@v4
with:
ref: ${{ github.ref }}
- run: git fetch --prune --unshallow
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: '${{ env.GO_VERSION }}'
- name: Set up ko
uses: ko-build/setup-ko@v0.9
- name: Login to container registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Run goreleaser
uses: goreleaser/goreleaser-action@v6
with:
version: '~> v2'
args: release --clean
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
KO_DOCKER_REPO: ghcr.io/gemfast