Skip to content

release

release #30

Workflow file for this run

name: release
on:
push:
tags:
- 'v*.*.*'
jobs:
release:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@master
- name: Setup Go
uses: actions/setup-go@v1
with:
go-version: 1.20
- name: Setup ko
uses: imjasonh/[email protected]
with:
version: v0.9.3
- name: Binary builds with GoReleaser
uses: goreleaser/goreleaser-action@v1
with:
version: latest
args: release --rm-dist
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Build and push multi-arch container images
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 .