63 lines
1.7 KiB
YAML
63 lines
1.7 KiB
YAML
name: Prepare Release
|
|
|
|
on:
|
|
workflow_dispatch:
|
|
inputs:
|
|
version:
|
|
description: Optional semantic version override, with or without leading v. When omitted, the recommended version is used.
|
|
required: false
|
|
workflow_call:
|
|
inputs:
|
|
version:
|
|
description: Optional semantic version override, with or without leading v. When omitted, the recommended version is used.
|
|
required: false
|
|
default: ''
|
|
type: string
|
|
|
|
jobs:
|
|
prepare:
|
|
runs-on: ubuntu-latest
|
|
container: docker.io/catthehacker/ubuntu:act-latest
|
|
defaults:
|
|
run:
|
|
shell: bash
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v4
|
|
with:
|
|
fetch-depth: 0
|
|
|
|
- name: Setup Go
|
|
uses: actions/setup-go@v5
|
|
with:
|
|
go-version: '1.26.1'
|
|
check-latest: true
|
|
cache: true
|
|
cache-dependency-path: go.sum
|
|
|
|
- name: Run tests
|
|
run: go test ./...
|
|
|
|
- name: Resolve cache token
|
|
id: cache-token
|
|
run: echo "value=${GITHUB_SHA}" >> "$GITHUB_OUTPUT"
|
|
|
|
- name: Prepare and tag release
|
|
id: prepare
|
|
uses: ./prepare
|
|
env:
|
|
VOCIFERATE_CACHE_TOKEN: ${{ steps.cache-token.outputs.value }}
|
|
with:
|
|
version: ${{ inputs.version }}
|
|
|
|
- name: Summarize prepared release
|
|
run: |
|
|
set -euo pipefail
|
|
tag="${{ steps.prepare.outputs.version }}"
|
|
{
|
|
echo "## Release Prepared"
|
|
echo
|
|
echo "- Tag pushed: ${tag}"
|
|
echo "- The tag-triggered Do Release workflow will create or update the release and publish binaries."
|
|
} >> "$GITHUB_STEP_SUMMARY"
|