name: Release# Starts a release: works out the next version from the newest v* tag, tags# main's commit with it, and pushes the tag. That tag push starts iso.yml,# which builds both architectures, uploads their files to# <bucket>/releases/<tag>/ and makes the Forgejo release.## Run it from Actions → Release → Run workflow (for a beta, Beta release# does the same in one click). The work is .forgejo/release-tag.sh. `bump`:# - prerelease: the next prerelease. v0.1.0-alpha.2 → v0.1.0-alpha.3. With# another `pre`: v0.1.0-alpha.2 → v0.1.0-beta.1. After a full release:# v0.1.0 → v0.1.1-alpha.1.# - release: the full release of the current prerelease, v0.1.0-rc.2 → v0.1.0.# - patch, minor, major: v0.1.0 → v0.1.1, v0.2.0, v1.0.0, or, with `pre`# other than none, v0.1.1-alpha.1 and so on. From a prerelease, patch# moves past it too: v0.1.0-alpha.2 → v0.1.1.# `version` (e.g. 1.0.0, without the v) skips all that.# `dry_run` says what it would tag, and tags nothing. It tags main's newest# commit not marked [skip ci]: Forgejo wouldn't build a tag on one.## Secret: RELEASE_TOKEN, a Forgejo token with write:repository on this repo,# for the push. Not the automatic token: a tag pushed with that doesn't# start iso.yml.on:workflow_dispatch:inputs:bump:description: What to releasetype: choiceoptions: [prerelease, release, patch, minor, major]default: prereleasepre:description: Prerelease label (prerelease, patch, minor and major)type: choiceoptions: [alpha, beta, rc, none]default: alphaversion:description: Exact version instead (e.g. 1.0.0 or 1.0.0-rc.1; no v)type: stringdefault: ''dry_run:description: Only say which tag it would maketype: booleandefault: falseconcurrency:group: releasecancel-in-progress: falsejobs:tag:runs-on: runner-x86-linuxsteps:- uses: https://forge.in.quineglobal.com/quine-global/mirror-actions-checkout@v4with:ref: mainfetch-depth: 0token: ${{ secrets.RELEASE_TOKEN || github.token }}- name: Tag the next release and push the tagenv:BUMP: ${{ inputs.bump }}PRE: ${{ inputs.pre }}VERSION: ${{ inputs.version }}DRY_RUN: ${{ inputs.dry_run }}HAS_TOKEN: ${{ secrets.RELEASE_TOKEN != '' }}run: .forgejo/release-tag.sh