From 58ceaf6f9ca9debeab5e60bd165cb33d5609b158 Mon Sep 17 00:00:00 2001 From: Claude Date: Mon, 5 Oct 2026 05:32:03 +0000 Subject: [PATCH] Let the Steam Frame release run by hand, creating its tag Tags cannot always be pushed from where a release is prepared. Run from the Actions tab, the workflow creates the tag on the run's commit through gh release create --target instead of requiring a pushed tag. Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_019HBRGKTE1GnN2ah8gcZKr3 --- .github/workflows/frame-release.yml | 30 +++++++++++++++++++++++------ 1 file changed, 24 insertions(+), 6 deletions(-) diff --git a/.github/workflows/frame-release.yml b/.github/workflows/frame-release.yml index c303721..a804d89 100644 --- a/.github/workflows/frame-release.yml +++ b/.github/workflows/frame-release.yml @@ -1,11 +1,18 @@ name: Steam Frame release -# A tag named frame- publishes a GitHub pre-release with the notes in -# docs/releases/.md. Source only: the game is built from the player's own disc and nothing -# built from it is distributed (README, Requirements). The v* tags stay with package.yml, which -# packages upstream's Windows installer. +# Publishes a GitHub pre-release with the notes in docs/releases/.md, either for a pushed +# frame- tag or, run by hand (Actions > Steam Frame release > Run workflow), for a tag +# GitHub creates on the commit the run is for. Source only: the game is built from the player's own +# disc and nothing built from it is distributed (README, Requirements). The v* tags stay with +# package.yml, which packages upstream's Windows installer. on: push: tags: ['frame-*'] + workflow_dispatch: + inputs: + tag: + description: Release tag, frame-; docs/releases/.md holds its notes + required: true + default: frame-beta-1 permissions: contents: write jobs: @@ -18,13 +25,24 @@ jobs: - name: Publish the pre-release env: GH_TOKEN: ${{ github.token }} - TAG: ${{ github.ref_name }} + TAG: ${{ github.event_name == 'workflow_dispatch' && inputs.tag || github.ref_name }} REPOSITORY: ${{ github.repository }} + DISPATCHED: ${{ github.event_name == 'workflow_dispatch' }} run: | + case "$TAG" in + frame-*) ;; + *) echo "::error::Steam Frame release tags start with frame-, not '$TAG'"; exit 1 ;; + esac notes="docs/releases/${TAG}.md" if [ ! -f "$notes" ]; then echo "::error::No release notes at $notes" exit 1 fi - gh release create "$TAG" --repo "$REPOSITORY" --verify-tag --prerelease \ + if [ "$DISPATCHED" = "true" ]; then + # GitHub creates the tag on this run's commit. + where=(--target "$GITHUB_SHA") + else + where=(--verify-tag) + fi + gh release create "$TAG" --repo "$REPOSITORY" "${where[@]}" --prerelease \ --title "WiiCompiled VR for the Steam Frame ${TAG#frame-}" --notes-file "$notes"