From a8d0f6c50f41ae00f0f13a0b242dc8536f0fa6be Mon Sep 17 00:00:00 2001 From: "Kody (bot)" <72270156+kody-bot@users.noreply.github.com> Date: Tue, 12 May 2026 12:39:34 -0600 Subject: [PATCH 1/8] ci: harden npm release workflow --- .github/workflows/release.yml | 75 ++++++++++++++++++++++++++--------- 1 file changed, 56 insertions(+), 19 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 837310f..c81b0df 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -6,59 +6,95 @@ concurrency: cancel-in-progress: true permissions: - contents: write # to be able to publish a GitHub release - id-token: write # to enable use of OIDC for npm provenance - issues: write # to be able to comment on released issues - pull-requests: write # to be able to comment on released pull requests + contents: read jobs: test: - name: πŸ§ͺ Test + name: ðŸ§Βͺ Test runs-on: ubuntu-latest steps: - - name: ⬇️ Checkout repo + - name: Ò¬‡ï¸ Checkout repo uses: actions/checkout@v5 - - name: βŽ” Setup node + - name: Γ’ΒŽΒ” Setup node uses: actions/setup-node@v6 with: node-version: lts/* - - name: πŸ“₯ Download deps + - name: Γ°ΒŸΒ“Β₯ Download deps uses: bahmutov/npm-install@v1 with: useLockFile: false - - name: πŸ§ͺ Test + - name: ðŸ§Βͺ Test run: npm run test - release: - name: πŸš€ Release + build-release-artifact: + name: πŸ“¦ Build release artifact needs: [test] runs-on: ubuntu-latest + permissions: + contents: read if: ${{ github.repository == 'epicweb-dev/invariant' && contains('refs/heads/main,refs/heads/beta,refs/heads/next,refs/heads/alpha', github.ref) && github.event_name == 'push' }} steps: - name: ⬇️ Checkout repo - uses: actions/checkout@v5 + uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd # v5 - name: βŽ” Setup node - uses: actions/setup-node@v6 + uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6 with: node-version: lts/* + package-manager-cache: false - - name: πŸ“₯ Download deps - uses: bahmutov/npm-install@v1 - with: - useLockFile: false + - name: πŸ“₯ Install deps + run: npm install --ignore-scripts - - name: πŸ“¦ Run Build + - name: πŸ“¦ Prepare package run: npm run build + - name: πŸ“¦ Upload package artifact + uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4 + with: + name: npm-package-artifact + path: dist + if-no-files-found: error + retention-days: 1 + + release: + name: πŸš€ Release + needs: [build-release-artifact] + runs-on: ubuntu-latest + permissions: + contents: write # to be able to publish a GitHub release + id-token: write # to enable use of OIDC for npm provenance + issues: write # to be able to comment on released issues + pull-requests: write # to be able to comment on released pull requests + if: + ${{ github.repository == 'epicweb-dev/invariant' && + contains('refs/heads/main,refs/heads/beta,refs/heads/next,refs/heads/alpha', + github.ref) && github.event_name == 'push' }} + steps: + - name: ⬇️ Checkout repo + uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd # v5 + + - name: βŽ” Setup node + uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6 + with: + node-version: 24 + registry-url: https://registry.npmjs.org + package-manager-cache: false + + - name: πŸ“¦ Download package artifact + uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4 + with: + name: npm-package-artifact + path: dist + - name: πŸš€ Release - uses: cycjimmy/semantic-release-action@v5.0.2 + uses: cycjimmy/semantic-release-action@ba330626c4750c19d8299de843f05c7aa5574f62 # v5.0.2 with: semantic_version: 25 branches: | @@ -73,3 +109,4 @@ jobs: env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} NPM_CONFIG_PROVENANCE: true + NPM_CONFIG_IGNORE_SCRIPTS: true From 43bf98781963cc89d9ce59f781c64ca2ffe78a99 Mon Sep 17 00:00:00 2001 From: "Kody (bot)" <72270156+kody-bot@users.noreply.github.com> Date: Tue, 12 May 2026 12:47:40 -0600 Subject: [PATCH 2/8] ci: fix workflow utf-8 encoding --- .github/workflows/release.yml | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index c81b0df..22e7baf 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -10,23 +10,23 @@ permissions: jobs: test: - name: ðŸ§Βͺ Test + name: πŸ§ͺ Test runs-on: ubuntu-latest steps: - - name: Ò¬‡ï¸ Checkout repo + - name: ⬇️ Checkout repo uses: actions/checkout@v5 - - name: Γ’ΒŽΒ” Setup node + - name: βŽ” Setup node uses: actions/setup-node@v6 with: node-version: lts/* - - name: Γ°ΒŸΒ“Β₯ Download deps + - name: πŸ“₯ Download deps uses: bahmutov/npm-install@v1 with: useLockFile: false - - name: ðŸ§Βͺ Test + - name: πŸ§ͺ Test run: npm run test build-release-artifact: @@ -43,7 +43,7 @@ jobs: - name: ⬇️ Checkout repo uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd # v5 - - name: βŽ” Setup node + - name: βŽ„ Setup node uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6 with: node-version: lts/* @@ -80,7 +80,7 @@ jobs: - name: ⬇️ Checkout repo uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd # v5 - - name: βŽ” Setup node + - name: βŽ„ Setup node uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6 with: node-version: 24 From 15c33cfda0bdf7f262e78b876a08e18f708fa34e Mon Sep 17 00:00:00 2001 From: "Kody (bot)" <72270156+kody-bot@users.noreply.github.com> Date: Tue, 12 May 2026 12:51:00 -0600 Subject: [PATCH 3/8] ci: address workflow review feedback --- .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 22e7baf..3e55314 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -61,7 +61,7 @@ jobs: name: npm-package-artifact path: dist if-no-files-found: error - retention-days: 1 + retention-days: 7 release: name: πŸš€ Release From d1d8aa77700f4490b52c0625208cd84517f07964 Mon Sep 17 00:00:00 2001 From: "Kody (bot)" <72270156+kody-bot@users.noreply.github.com> Date: Tue, 12 May 2026 12:59:32 -0600 Subject: [PATCH 4/8] ci: include next-major in release gate --- .github/workflows/release.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 3e55314..d8ddef6 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -37,7 +37,7 @@ jobs: contents: read if: ${{ github.repository == 'epicweb-dev/invariant' && - contains('refs/heads/main,refs/heads/beta,refs/heads/next,refs/heads/alpha', + contains('refs/heads/main,refs/heads/beta,refs/heads/next,refs/heads/next-major,refs/heads/alpha', github.ref) && github.event_name == 'push' }} steps: - name: ⬇️ Checkout repo @@ -74,7 +74,7 @@ jobs: pull-requests: write # to be able to comment on released pull requests if: ${{ github.repository == 'epicweb-dev/invariant' && - contains('refs/heads/main,refs/heads/beta,refs/heads/next,refs/heads/alpha', + contains('refs/heads/main,refs/heads/beta,refs/heads/next,refs/heads/next-major,refs/heads/alpha', github.ref) && github.event_name == 'push' }} steps: - name: ⬇️ Checkout repo From 1f6303bd9f426ed0917ebc75b567e691c2fcf8d4 Mon Sep 17 00:00:00 2001 From: "Kody (bot)" <72270156+kody-bot@users.noreply.github.com> Date: Tue, 12 May 2026 13:08:15 -0600 Subject: [PATCH 5/8] ci: align release workflow guards --- .github/workflows/release.yml | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index d8ddef6..f0d7dca 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -35,10 +35,7 @@ jobs: runs-on: ubuntu-latest permissions: contents: read - if: - ${{ github.repository == 'epicweb-dev/invariant' && - contains('refs/heads/main,refs/heads/beta,refs/heads/next,refs/heads/next-major,refs/heads/alpha', - github.ref) && github.event_name == 'push' }} + if: ${{ github.repository == 'epicweb-dev/invariant' && github.event_name == 'push' }} steps: - name: ⬇️ Checkout repo uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd # v5 @@ -72,10 +69,7 @@ jobs: id-token: write # to enable use of OIDC for npm provenance issues: write # to be able to comment on released issues pull-requests: write # to be able to comment on released pull requests - if: - ${{ github.repository == 'epicweb-dev/invariant' && - contains('refs/heads/main,refs/heads/beta,refs/heads/next,refs/heads/next-major,refs/heads/alpha', - github.ref) && github.event_name == 'push' }} + if: ${{ github.repository == 'epicweb-dev/invariant' && github.event_name == 'push' }} steps: - name: ⬇️ Checkout repo uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd # v5 From 13b23008c1d909c11df66e76018b4f100c11838e Mon Sep 17 00:00:00 2001 From: "Kody (bot)" <72270156+kody-bot@users.noreply.github.com> Date: Tue, 12 May 2026 17:15:05 -0600 Subject: [PATCH 6/8] ci: remove emoji from workflow step names --- .github/workflows/release.yml | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index f0d7dca..355aa27 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -13,20 +13,20 @@ jobs: name: πŸ§ͺ Test runs-on: ubuntu-latest steps: - - name: ⬇️ Checkout repo + - name: Checkout repo uses: actions/checkout@v5 - - name: βŽ” Setup node + - name: Setup node uses: actions/setup-node@v6 with: node-version: lts/* - - name: πŸ“₯ Download deps + - name: Download deps uses: bahmutov/npm-install@v1 with: useLockFile: false - - name: πŸ§ͺ Test + - name: Test run: npm run test build-release-artifact: @@ -37,22 +37,22 @@ jobs: contents: read if: ${{ github.repository == 'epicweb-dev/invariant' && github.event_name == 'push' }} steps: - - name: ⬇️ Checkout repo + - name: Checkout repo uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd # v5 - - name: βŽ„ Setup node + - name: Setup node uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6 with: node-version: lts/* package-manager-cache: false - - name: πŸ“₯ Install deps + - name: Install deps run: npm install --ignore-scripts - - name: πŸ“¦ Prepare package + - name: Prepare package run: npm run build - - name: πŸ“¦ Upload package artifact + - name: Upload package artifact uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4 with: name: npm-package-artifact @@ -71,23 +71,23 @@ jobs: pull-requests: write # to be able to comment on released pull requests if: ${{ github.repository == 'epicweb-dev/invariant' && github.event_name == 'push' }} steps: - - name: ⬇️ Checkout repo + - name: Checkout repo uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd # v5 - - name: βŽ„ Setup node + - name: Setup node uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6 with: node-version: 24 registry-url: https://registry.npmjs.org package-manager-cache: false - - name: πŸ“¦ Download package artifact + - name: Download package artifact uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4 with: name: npm-package-artifact path: dist - - name: πŸš€ Release + - name: Release uses: cycjimmy/semantic-release-action@ba330626c4750c19d8299de843f05c7aa5574f62 # v5.0.2 with: semantic_version: 25 From 7252a5afb5c981f074a99d47815fdd91bb878119 Mon Sep 17 00:00:00 2001 From: "Kody (bot)" <72270156+kody-bot@users.noreply.github.com> Date: Tue, 12 May 2026 18:06:15 -0600 Subject: [PATCH 7/8] ci: preserve existing workflow labels --- .github/workflows/release.yml | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 355aa27..e4e94ee 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -1,4 +1,4 @@ -name: release +name: πŸš€ Release on: [push, pull_request] concurrency: @@ -13,20 +13,20 @@ jobs: name: πŸ§ͺ Test runs-on: ubuntu-latest steps: - - name: Checkout repo + - name: ⬇️ Checkout repo uses: actions/checkout@v5 - - name: Setup node + - name: βŽ” Setup node uses: actions/setup-node@v6 with: node-version: lts/* - - name: Download deps + - name: πŸ“₯ Download deps uses: bahmutov/npm-install@v1 with: useLockFile: false - - name: Test + - name: πŸ§ͺ Test run: npm run test build-release-artifact: @@ -37,10 +37,10 @@ jobs: contents: read if: ${{ github.repository == 'epicweb-dev/invariant' && github.event_name == 'push' }} steps: - - name: Checkout repo + - name: ⬇️ Checkout repo uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd # v5 - - name: Setup node + - name: βŽ” Setup node uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6 with: node-version: lts/* @@ -71,10 +71,10 @@ jobs: pull-requests: write # to be able to comment on released pull requests if: ${{ github.repository == 'epicweb-dev/invariant' && github.event_name == 'push' }} steps: - - name: Checkout repo + - name: ⬇️ Checkout repo uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd # v5 - - name: Setup node + - name: βŽ” Setup node uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6 with: node-version: 24 @@ -87,7 +87,7 @@ jobs: name: npm-package-artifact path: dist - - name: Release + - name: πŸš€ Release uses: cycjimmy/semantic-release-action@ba330626c4750c19d8299de843f05c7aa5574f62 # v5.0.2 with: semantic_version: 25 From 7d94389eecda24d2510f73b88c94851bc7353b51 Mon Sep 17 00:00:00 2001 From: "Kody (bot)" <72270156+kody-bot@users.noreply.github.com> Date: Tue, 12 May 2026 18:07:53 -0600 Subject: [PATCH 8/8] ci: preserve workflow label context --- .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 e4e94ee..37ada8e 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -1,4 +1,4 @@ -name: πŸš€ Release +name: release on: [push, pull_request] concurrency: