Skip to content

chore: Upgrade Go version to 1.23 (#136) #3

chore: Upgrade Go version to 1.23 (#136)

chore: Upgrade Go version to 1.23 (#136) #3

Workflow file for this run

##
## This GitHub Action is used to release a new version of Furiko.
##
## The Action is run whenever a new tag is pushed, and will perform the following:
##
## - Build artifacts for each platform
## - Create a GitHub Release
## - Push new container image tags
##
## The release process is currently done with GoReleaser: https://goreleaser.com/
##
name: Release new version
on:
push:
tags:
- '*'
workflow_dispatch:
jobs:
release:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Determine Go version from go.mod
run: echo "GO_VERSION=$(grep "go 1." go.mod | cut -d " " -f 2)" >> $GITHUB_ENV
- uses: actions/setup-go@v3
with:
go-version: ${{ env.GO_VERSION }}
- name: Set up Docker Buildx
id: docker-buildx
uses: docker/setup-buildx-action@v2
with:
platforms: |
linux/amd64
linux/arm
linux/arm64
- uses: actions/cache@v2
with:
path: ~/go/pkg/mod
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-go-
- name: Log in to the Container registry
uses: docker/login-action@f054a8b539a109f9f41c372932f1ae047eff08c9
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Run goreleaser
uses: goreleaser/goreleaser-action@v2
with:
distribution: goreleaser
version: latest
args: release --rm-dist
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# NOTE(irvinlim): If we don't specify this, then GoReleaser uses the "default" buildx
# instance with --builder=default, which doesn't add other architectures by default.
# We will pass this to the `docker buildx --builder=` command in GoReleaser.
DOCKER_BUILDX_INSTANCE: ${{ steps.docker-buildx.outputs.name }}