From 7e0eaa023f394185df2b2e4c8da775fc64fe4e22 Mon Sep 17 00:00:00 2001 From: Matt Carroll Date: Wed, 4 Feb 2026 09:42:24 +1100 Subject: [PATCH 1/2] AP-6973 # Changed npm publishes to single workflow file to work with npm Trusted Publishing --- .github/workflows/release.alpha.yml | 22 ----------- .github/workflows/release.beta.yml | 22 ----------- .github/workflows/release.yml | 61 ++++++++++++++++++++++++++--- 3 files changed, 56 insertions(+), 49 deletions(-) delete mode 100644 .github/workflows/release.alpha.yml delete mode 100644 .github/workflows/release.beta.yml diff --git a/.github/workflows/release.alpha.yml b/.github/workflows/release.alpha.yml deleted file mode 100644 index 8e75340f..00000000 --- a/.github/workflows/release.alpha.yml +++ /dev/null @@ -1,22 +0,0 @@ -name: Release (alpha) -on: - push: - tags: - - 'v[0-9]+.[0-9]+.[0-9]+-alpha.[0-9]+' -jobs: - publish: - name: NPM Publish (alpha) - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - - uses: actions/setup-node@v6 - with: - node-version: '24' - - run: npm install --global npm@11 - - run: npm ci - - run: npm test - - uses: JS-DevTools/npm-publish@v4 - with: - token: ${{ secrets.NPM_TOKEN }} - access: 'public' - tag: 'alpha' diff --git a/.github/workflows/release.beta.yml b/.github/workflows/release.beta.yml deleted file mode 100644 index 13046288..00000000 --- a/.github/workflows/release.beta.yml +++ /dev/null @@ -1,22 +0,0 @@ -name: Release (beta) -on: - push: - tags: - - 'v[0-9]+.[0-9]+.[0-9]+-beta.[0-9]+' -jobs: - publish: - name: NPM Publish (beta) - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - - uses: actions/setup-node@v6 - with: - node-version: '24' - - run: npm install --global npm@11 - - run: npm ci - - run: npm test - - uses: JS-DevTools/npm-publish@v4 - with: - token: ${{ secrets.NPM_TOKEN }} - access: 'public' - tag: 'beta' diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 1b29fd81..4bc0641d 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -2,11 +2,60 @@ name: Release on: push: tags: - - 'v[0-9]+.[0-9]+.[0-9]+' + - 'v*' # Triggers on any tag starting with v (e.g. v1.0.0, v1.0.0-beta.1) jobs: - release: + # ------------------------------------------------------------------ + # BETA RELEASE JOB + # Runs only if the tag contains '-alpha' + # ------------------------------------------------------------------ + publish-alpha: + name: NPM Publish (alpha) + runs-on: ubuntu-latest + if: contains(github.ref, '-alpha') + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-node@v6 + with: + node-version: '24' + - run: npm install --global npm@11 + - run: npm ci + - run: npm test + - uses: JS-DevTools/npm-publish@v4 + with: + token: ${{ secrets.NPM_TOKEN }} + access: 'public' + tag: 'alpha' + + # ------------------------------------------------------------------ + # BETA RELEASE JOB + # Runs only if the tag contains '-beta' + # ------------------------------------------------------------------ + publish-beta: + name: NPM Publish (beta) + runs-on: ubuntu-latest + if: contains(github.ref, '-beta') + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-node@v6 + with: + node-version: '24' + - run: npm install --global npm@11 + - run: npm ci + - run: npm test + - uses: JS-DevTools/npm-publish@v4 + with: + token: ${{ secrets.NPM_TOKEN }} + access: 'public' + tag: 'beta' + + # ------------------------------------------------------------------ + # PRODUCTION JOBS + # Run only if the tag does NOT contain a hyphen (e.g. v1.0.0) + # ------------------------------------------------------------------ + release-production: name: Github Release runs-on: ubuntu-latest + if: ${{ !contains(github.ref, '-') }} steps: - uses: actions/checkout@v6 - uses: docker://antonyurchenko/git-release:v6 @@ -16,9 +65,10 @@ jobs: PRE_RELEASE: 'false' CHANGELOG_FILE: 'CHANGELOG.md' ALLOW_EMPTY_CHANGELOG: 'false' - docs: + docs-production: name: Documentation runs-on: ubuntu-latest + if: ${{ !contains(github.ref, '-') }} steps: - uses: actions/checkout@v6 - uses: actions/setup-node@v6 @@ -33,9 +83,10 @@ jobs: commit_prefix: '[DOCS] ' commit_message: ${{ github.ref_name }} target_branch: 'master' - publish: - name: NPM Publish + publish-production: + name: NPM Publish (latest) runs-on: ubuntu-latest + if: ${{ !contains(github.ref, '-') }} steps: - uses: actions/checkout@v4 - uses: actions/setup-node@v6 From fbbeec3611080be29b8308e21e799801370a60e3 Mon Sep 17 00:00:00 2001 From: Matt Carroll Date: Wed, 4 Feb 2026 09:46:49 +1100 Subject: [PATCH 2/2] Update .github/workflows/release.yml Co-authored-by: divporter <42131292+divporter@users.noreply.github.com> --- .github/workflows/release.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 4bc0641d..61744432 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -5,7 +5,7 @@ on: - 'v*' # Triggers on any tag starting with v (e.g. v1.0.0, v1.0.0-beta.1) jobs: # ------------------------------------------------------------------ - # BETA RELEASE JOB + # ALPHA RELEASE JOB # Runs only if the tag contains '-alpha' # ------------------------------------------------------------------ publish-alpha: