From 9282405f34ad50e9e74f69c88227fa603d05fc9b Mon Sep 17 00:00:00 2001 From: tanglearncode Date: Wed, 21 Oct 2026 11:56:00 +0800 Subject: [PATCH] Prepare v1 release for GitHub Marketplace Document @v1 usage and add a workflow that moves the major version tag to each published stable release. --- .github/workflows/major-tag.yml | 26 ++++++++++++++++++++++++++ README.md | 11 +++++++---- 2 files changed, 33 insertions(+), 4 deletions(-) create mode 100644 .github/workflows/major-tag.yml diff --git a/.github/workflows/major-tag.yml b/.github/workflows/major-tag.yml new file mode 100644 index 0000000..70b8f73 --- /dev/null +++ b/.github/workflows/major-tag.yml @@ -0,0 +1,26 @@ +name: Update major tag + +# Points the major version tag (v1, v2, ...) at each published stable release so +# that `uses: XTSoftwareLabs/nativeboat-action@v1` picks up the latest v1.x.y. +on: + release: + types: [published] + +permissions: + contents: write + +jobs: + tag: + if: ${{ !github.event.release.prerelease }} + runs-on: windows-latest + steps: + - uses: actions/checkout@v7 + - name: Move major tag + shell: pwsh + env: + TAG: ${{ github.event.release.tag_name }} + run: | + if ($env:TAG -notmatch '^(v\d+)\.\d+\.\d+$') { throw "Release tag '$env:TAG' is not vX.Y.Z." } + $major = $Matches[1] + git tag -f $major "$env:TAG^{commit}" + git push -f origin "refs/tags/${major}" diff --git a/README.md b/README.md index 0661260..84c7e80 100644 --- a/README.md +++ b/README.md @@ -25,7 +25,7 @@ jobs: - uses: actions/setup-node@v7 with: node-version: '22' - - uses: XTSoftwareLabs/nativeboat-action@main + - uses: XTSoftwareLabs/nativeboat-action@v1 id: nativeboat with: project-path: apps/desktop-electron @@ -43,9 +43,9 @@ available, for example with `actions/setup-node` and `pnpm/action-setup` for a pnpm project. Projects whose packaging scripts build helper programs also need the corresponding build tools. Installing dependencies before the action works too. -The example tracks this action's `main` branch. Pin the action to a commit SHA for -reproducible CI, and pin the compiler with `version` using an exact published -release tag, including its `v` prefix. +`@v1` follows the latest `v1.x.y` release of this action. Pin a full release tag +such as `@v1.0.0`, or a commit SHA, for reproducible CI, and pin the compiler with +`version` using an exact published release tag, including its `v` prefix. ## Inputs @@ -94,3 +94,6 @@ The action runs directly from `src/` with the GitHub runner's Node.js 24 runtime It uses only Node.js built-ins. Tests run on Windows and Linux. The **Smoke build** workflow compiles the included Electron fixture using a published compiler release; run it manually with the desired release tag. + +Releases use `vX.Y.Z` tags. Publishing a stable release runs the **Update major +tag** workflow, which moves the `vX` tag to that release.