Skip to content

release

release #11

Workflow file for this run

name: release
on:
workflow_dispatch:
inputs:
release-as:
description: "semver type of the release"
type: choice
options:
- patch
- minor
- major
default: none
required: true
prerelease:
description: "release as prerelease"
type: boolean
required: true
default: true
prerelease-suffix:
description: suffix for your prerelease versions
type: string
required: false
default: beta
permissions: {}
jobs:
release:
name: release
runs-on: ubuntu-latest
env:
DOCKER_CLI_EXPERIMENTAL: "enabled"
permissions:
contents: write
packages: write
steps:
- name: Checkout
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
fetch-depth: 0
- name: Set up QEMU
uses: docker/setup-qemu-action@49b3bc8e6bdd4a60e6116a5414239cba5943d3cf # v3.2.0
- name: Setup Go
uses: actions/setup-go@41dfa10bad2bb2ae585af6ee5bb4d7d973ad74ed # v5.1.0
with:
go-version-file: ./go.mod
check-latest: true
- name: Login to GitHub Container Registry
uses: docker/login-action@9780b0c442fbb1117ed29e0efdff1e18412f7567 # v3.3.0
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Fetch tags
run: git fetch --force --tags
- name: Bump version and push tag
uses: anothrNick/github-tag-action@f278d49d30cdd8775cc3e7dd00b5ee11686ee297 # 1.71.0
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
WITH_V: true
DEFAULT_BUMP: ${{ inputs.release-as }}
PRERELEASE: ${{ inputs.prerelease }}
PRERELEASE_SUFFIX: ${{ inputs.prerelease-suffix }}
VERBOSE: true
DRY_RUN: false
- name: Run GoReleaser
uses: goreleaser/goreleaser-action@286f3b13b1b49da4ac219696163fb8c1c93e1200 # v6.0.0
with:
version: latest
args: release --clean
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
FURY_TOKEN: ${{ secrets.FURY_TOKEN }}
ORG_NAME: ${{ github.repository_owner }}
- name: Upload assets
uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # v4.4.3
with:
name: ${{ github.repository_owner }}
path: dist/*