Files
archie/.github/workflows/release.yml
T
sam c8a46fd9e7
deploy / gate (push) Successful in 16m26s
deploy / agent-image (push) Successful in 12s
deploy / dist-zip (push) Skipped
deploy / archied-image (push) Successful in 3m53s
ci: drop comments from workflow files
2026-11-08 16:55:03 +11:00

56 lines
1.4 KiB
YAML

name: release
on:
workflow_dispatch:
inputs:
release:
description: "major, minor, patch, or an exact version such as 1.57.0"
required: true
default: minor
concurrency:
group: release
permissions:
contents: write
jobs:
cut:
runs-on: self-hosted
steps:
- name: Check DEPLOY_TOKEN is configured
env:
DEPLOY_TOKEN: ${{ secrets.DEPLOY_TOKEN }}
run: |
if [ -z "$DEPLOY_TOKEN" ]; then
echo "::error::DEPLOY_TOKEN is not set for this repository, so the release cannot push its commit and tag. Set the secret here, or dispatch the release from the Gitea primary."
exit 1
fi
- name: Checkout
uses: actions/checkout@v4
with:
ref: main
fetch-depth: 0
token: ${{ secrets.DEPLOY_TOKEN }}
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version-file: go.mod
cache: false
- name: Install Task
run: go install github.com/go-task/task/v3/cmd/task@v3.48.0
- name: Cut the release
env:
RELEASE: ${{ inputs.release }}
run: |
git config user.name "Sam Catlow"
git config user.email "sam@catlow.tech"
task release RELEASE="$RELEASE"
- name: Push the release
run: git push --atomic origin main "$(git describe --exact-match --match 'v*' HEAD)"