From b5f4119bdbe1aa4a9fa093996b21e37b017a25eb Mon Sep 17 00:00:00 2001 From: Claude Date: Mon, 5 Oct 2026 23:35:54 +0000 Subject: [PATCH] Let the release workflow publish from the Actions tab Running the workflow on main with "Publish" ticked tags v on that commit and creates the release, the same as pushing the tag. Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_01A59Ve6VGuz6nxXu3QEXpeA --- .github/workflows/release-windows.yml | 11 +++++++++-- README.md | 3 +++ 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/.github/workflows/release-windows.yml b/.github/workflows/release-windows.yml index 814482a..19f179d 100644 --- a/.github/workflows/release-windows.yml +++ b/.github/workflows/release-windows.yml @@ -5,6 +5,11 @@ on: tags: - "v*" workflow_dispatch: + inputs: + publish: + description: "Publish: tag v on this commit of main and create the GitHub release" + type: boolean + default: false permissions: contents: write @@ -73,16 +78,18 @@ jobs: dist/AppTrackr_Portable.zip - name: Check release notes - if: github.ref_type == 'tag' + if: github.ref_type == 'tag' || (inputs.publish && github.ref == 'refs/heads/main') shell: pwsh run: | $notes = "docs/releases/${{ steps.version.outputs.value }}.md" if (-not (Test-Path $notes)) { Write-Error "Missing $notes (update steps shown on the release page)"; exit 1 } - name: Publish release - if: github.ref_type == 'tag' + if: github.ref_type == 'tag' || (inputs.publish && github.ref == 'refs/heads/main') uses: softprops/action-gh-release@v2 with: + tag_name: v${{ steps.version.outputs.value }} + target_commitish: ${{ github.sha }} name: AppTrackr ${{ steps.version.outputs.value }} body_path: docs/releases/${{ steps.version.outputs.value }}.md files: | diff --git a/README.md b/README.md index 5c65279..2f50063 100644 --- a/README.md +++ b/README.md @@ -249,6 +249,9 @@ git tag v1.1.0 git push origin v1.1.0 ``` +Or, without a local tag: *Actions > Release Windows Build > Run workflow* on `main` with *Publish* ticked. +The workflow tags `v` on that commit and publishes the release. + `.github/workflows/release-windows.yml` checks that the tag matches the version and that the release notes exist, runs the tests, builds the PyInstaller bundle, self-tests it, packages the portable zip and the Inno Setup installer, and publishes both with the notes as the GitHub release. `ci.yml` runs lint and tests on Windows and Linux for every push and pull request.