Files
shared-actions/.github/actions/goreleaser/action.yml
T
lukaszraczylo e4dac8969a chore(actions): bump shared actions to latest major versions
- actions/checkout v4 -> v6
- actions/setup-go v5 -> v6
- actions/setup-node v4 -> v6
- actions/upload-artifact v4 -> v7
- actions/download-artifact v4 -> v8
- actions/github-script v7 -> v9
- goreleaser/goreleaser-action v6 -> v7
- docker/login-action v3 -> v4
- docker/setup-buildx-action v3 -> v4
- docker/setup-qemu-action v3 -> v4
- sigstore/cosign-installer v3 -> v4
- peter-evans/create-pull-request v7 -> v8
2026-05-21 03:14:01 +01:00

78 lines
2.3 KiB
YAML

name: "GoReleaser"
description: "Run GoReleaser with optional split/merge for CGO builds"
inputs:
version-tag:
description: "Version tag to release"
required: true
mode:
description: "Mode: 'full' (single runner), 'split' (matrix build), 'merge' (combine split builds)"
required: false
default: "full"
cgo-enabled:
description: "Enable CGO"
required: false
default: "0"
github-token:
description: "GitHub token"
required: true
goreleaser-key:
description: "GoReleaser Pro license key (for split/merge)"
required: false
default: ""
homebrew-tap-token:
description: "Homebrew tap token (optional)"
required: false
default: ""
runs:
using: "composite"
steps:
- name: Create tag
shell: bash
run: |
git config user.name "github-actions[bot]"
git config user.email "github-actions[bot]@users.noreply.github.com"
git tag -a ${{ inputs.version-tag }} -m "Release ${{ inputs.version-tag }}" || true
if [[ "${{ inputs.mode }}" != "split" ]]; then
git push origin ${{ inputs.version-tag }} || true
fi
- name: Install cosign
uses: sigstore/cosign-installer@v4
- name: Run GoReleaser (full)
if: inputs.mode == 'full'
uses: goreleaser/goreleaser-action@v7
with:
distribution: goreleaser
version: "~> v2"
args: release --clean
env:
GITHUB_TOKEN: ${{ inputs.github-token }}
HOMEBREW_TAP_TOKEN: ${{ inputs.homebrew-tap-token }}
CGO_ENABLED: ${{ inputs.cgo-enabled }}
- name: Run GoReleaser Pro (split)
if: inputs.mode == 'split'
uses: goreleaser/goreleaser-action@v7
with:
distribution: goreleaser-pro
version: "~> v2"
args: release --clean --split
env:
GITHUB_TOKEN: ${{ inputs.github-token }}
GORELEASER_KEY: ${{ inputs.goreleaser-key }}
CGO_ENABLED: ${{ inputs.cgo-enabled }}
- name: Run GoReleaser Pro (merge)
if: inputs.mode == 'merge'
uses: goreleaser/goreleaser-action@v7
with:
distribution: goreleaser-pro
version: "~> v2"
args: continue --merge
env:
GITHUB_TOKEN: ${{ inputs.github-token }}
GORELEASER_KEY: ${{ inputs.goreleaser-key }}