-
Notifications
You must be signed in to change notification settings - Fork 189
39 lines (39 loc) · 1.05 KB
/
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
name: release
on:
push:
tags:
- 'v*.*.*'
jobs:
release:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@master
with:
fetch-depth: 0
- name: Setup Go
uses: actions/setup-go@v5
with:
go-version: '1.22'
- name: Setup ko
uses: imjasonh/[email protected]
with:
version: v0.9.3
- name: Binary builds with GoReleaser
uses: goreleaser/goreleaser-action@v5
with:
version: latest
args: release --clean
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Build and push multi-arch container images
env:
VERSION_TAG: ${GITHUB_REF_NAME#v}
run: |
set -euo pipefail
tag="$(git describe --tag --always --dirty)"
export KO_DOCKER_REPO="ghcr.io/${{ github.repository }}"
export PATH="$(go env GOPATH)/bin:$PATH"
echo "${{ github.token }}" | ko login ghcr.io --username ignored --password-stdin
set -x
ko publish --bare --tags "$tag" --platform=all .