From fd7846e47d6e55d4700fd476219c00ee36a30e22 Mon Sep 17 00:00:00 2001 From: Florian Greinacher Date: Wed, 25 Feb 2026 14:02:01 +0100 Subject: [PATCH 01/11] ci: add dry_release job --- .github/workflows/test.yml | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index f522ee80..53585397 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -45,3 +45,21 @@ jobs: cache: npm - run: npm ci - run: npm run lint + dry_release: + # permissions: + # contents: read # to be able to publish a GitHub release + # issues: read # to be able to comment on released issues + # pull-requests: write # to be able to comment on released pull requests + # id-token: write # to enable use of OIDC for npm provenance + name: dry_release + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 + - uses: actions/setup-node@6044e13b5dc448c55e2357c09f80417699197238 # v6.2.0 + with: + cache: npm + node-version: lts/* + - run: npm ci + - run: npx semantic-release --dry-run + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} From fa8b34021e11576b76a8b33ccaa551c5d8ee2576 Mon Sep 17 00:00:00 2001 From: Florian Greinacher Date: Wed, 25 Feb 2026 14:22:10 +0100 Subject: [PATCH 02/11] ci: disable ci verification --- .github/workflows/test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 53585397..8f1a50cb 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -60,6 +60,6 @@ jobs: cache: npm node-version: lts/* - run: npm ci - - run: npx semantic-release --dry-run + - run: npx semantic-release --dry-run --ci false env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} From aae21005f720c00370de031cf00b227774aeff84 Mon Sep 17 00:00:00 2001 From: Florian Greinacher Date: Wed, 25 Feb 2026 14:30:32 +0100 Subject: [PATCH 03/11] ci: enable semantic-release for pr ref --- .github/workflows/test.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 8f1a50cb..754cadb0 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -60,6 +60,7 @@ jobs: cache: npm node-version: lts/* - run: npm ci - - run: npx semantic-release --dry-run --ci false + - run: npx semantic-release --dry-run --ci false --branches $GITHUB_REF env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + From 04231779bceed3c72486f0c5a52e72d5ea9e5a73 Mon Sep 17 00:00:00 2001 From: Florian Greinacher Date: Thu, 26 Feb 2026 12:38:40 +0100 Subject: [PATCH 04/11] ci: use GITHUB_REF_NAME --- .github/workflows/test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 754cadb0..9ac44e6a 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -60,7 +60,7 @@ jobs: cache: npm node-version: lts/* - run: npm ci - - run: npx semantic-release --dry-run --ci false --branches $GITHUB_REF + - run: npx semantic-release --dry-run --ci false --branches $GITHUB_REF_NAME env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} From e6be0f93ac6039965257ad5d25fa9bbb025279c7 Mon Sep 17 00:00:00 2001 From: Florian Greinacher Date: Thu, 26 Feb 2026 13:05:32 +0100 Subject: [PATCH 05/11] ci: introduce separate release preview workflow --- .github/workflows/release-preview.yml | 27 +++++++++++++++++++++++++++ .github/workflows/test.yml | 19 ------------------- 2 files changed, 27 insertions(+), 19 deletions(-) create mode 100644 .github/workflows/release-preview.yml diff --git a/.github/workflows/release-preview.yml b/.github/workflows/release-preview.yml new file mode 100644 index 00000000..358e3a53 --- /dev/null +++ b/.github/workflows/release-preview.yml @@ -0,0 +1,27 @@ +name: Release Preview +"on": + pull_request: + types: + - opened + - synchronize +permissions: + contents: read # for checkout +jobs: + release-preview: + permissions: + issues: read # to be able to comment on released issues + pull-requests: read # to be able to comment on released pull requests + name: release + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 + with: + fetch-depth: 0 + - uses: actions/setup-node@6044e13b5dc448c55e2357c09f80417699197238 # v6.2.0 + with: + cache: npm + node-version: lts/* + - run: npm ci + - run: npx semantic-release --dry-run --ci false --branches $GITHUB_HEAD_REF + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 9ac44e6a..f522ee80 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -45,22 +45,3 @@ jobs: cache: npm - run: npm ci - run: npm run lint - dry_release: - # permissions: - # contents: read # to be able to publish a GitHub release - # issues: read # to be able to comment on released issues - # pull-requests: write # to be able to comment on released pull requests - # id-token: write # to enable use of OIDC for npm provenance - name: dry_release - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 - - uses: actions/setup-node@6044e13b5dc448c55e2357c09f80417699197238 # v6.2.0 - with: - cache: npm - node-version: lts/* - - run: npm ci - - run: npx semantic-release --dry-run --ci false --branches $GITHUB_REF_NAME - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - From 8f69b615edba63dd5680d9be0d4a038d71d1d7c1 Mon Sep 17 00:00:00 2001 From: Florian Greinacher Date: Thu, 26 Feb 2026 13:44:14 +0100 Subject: [PATCH 06/11] ci: use GITHUB_REF_NAME --- .github/workflows/release-preview.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/release-preview.yml b/.github/workflows/release-preview.yml index 358e3a53..be890e69 100644 --- a/.github/workflows/release-preview.yml +++ b/.github/workflows/release-preview.yml @@ -22,6 +22,6 @@ jobs: cache: npm node-version: lts/* - run: npm ci - - run: npx semantic-release --dry-run --ci false --branches $GITHUB_HEAD_REF + - run: npx semantic-release --dry-run --ci false --branches $GITHUB_REF_NAME env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} From 8822db527d23beac5d2c24c4c2162c02c13662d0 Mon Sep 17 00:00:00 2001 From: Florian Greinacher Date: Thu, 26 Feb 2026 13:47:32 +0100 Subject: [PATCH 07/11] ci: dump refs --- .github/workflows/release-preview.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/release-preview.yml b/.github/workflows/release-preview.yml index be890e69..d00b5430 100644 --- a/.github/workflows/release-preview.yml +++ b/.github/workflows/release-preview.yml @@ -22,6 +22,8 @@ jobs: cache: npm node-version: lts/* - run: npm ci - - run: npx semantic-release --dry-run --ci false --branches $GITHUB_REF_NAME + - run: echo GITHUB_REF=$GITHUB_REF + - run: echo GITHUB_REF_NAME=$GITHUB_REF_NAME + - run: npx semantic-release --dry-run --ci false --branches $GITHUB_REF env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} From 9e160ca656a5350bb41d6180dff7b2ef66bf1256 Mon Sep 17 00:00:00 2001 From: Florian Greinacher Date: Thu, 26 Feb 2026 14:04:33 +0100 Subject: [PATCH 08/11] ci : hard-code branch name --- .github/workflows/release-preview.yml | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/.github/workflows/release-preview.yml b/.github/workflows/release-preview.yml index d00b5430..a71a6930 100644 --- a/.github/workflows/release-preview.yml +++ b/.github/workflows/release-preview.yml @@ -22,8 +22,6 @@ jobs: cache: npm node-version: lts/* - run: npm ci - - run: echo GITHUB_REF=$GITHUB_REF - - run: echo GITHUB_REF_NAME=$GITHUB_REF_NAME - - run: npx semantic-release --dry-run --ci false --branches $GITHUB_REF + - run: npx semantic-release --dry-run --ci false --branches pull/960/merge env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} From a6ae15149135c1db4e3b3dfbe343ca8b1ab2c2e4 Mon Sep 17 00:00:00 2001 From: Florian Greinacher Date: Thu, 26 Feb 2026 14:13:24 +0100 Subject: [PATCH 09/11] ci: fix dry run --- .github/workflows/release-preview.yml | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/.github/workflows/release-preview.yml b/.github/workflows/release-preview.yml index a71a6930..cee5e1d9 100644 --- a/.github/workflows/release-preview.yml +++ b/.github/workflows/release-preview.yml @@ -22,6 +22,12 @@ jobs: cache: npm node-version: lts/* - run: npm ci - - run: npx semantic-release --dry-run --ci false --branches pull/960/merge + # Perform a dry run without publishing anything. + # + # Unset the `GITHUB_ACTIONS` environment variable to trick semantic-release into thinking it's not running in a CI environment, + # as `--no-ci` alone is insufficient. + # + # Use `--branches "${GITHUB_HEAD_REF}"` to consider the PR head ref (source branch) as a release one for the dry run. + - run: npx --no-install semantic-release --dry-run --no-ci --branches "${GITHUB_HEAD_REF}" env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} From 82fd0b92f609737ce388a37f2bfff385146d39e9 Mon Sep 17 00:00:00 2001 From: Florian Greinacher Date: Thu, 26 Feb 2026 14:30:36 +0100 Subject: [PATCH 10/11] ci: another try --- .github/workflows/release-preview.yml | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/.github/workflows/release-preview.yml b/.github/workflows/release-preview.yml index cee5e1d9..d12e9b54 100644 --- a/.github/workflows/release-preview.yml +++ b/.github/workflows/release-preview.yml @@ -22,12 +22,8 @@ jobs: cache: npm node-version: lts/* - run: npm ci - # Perform a dry run without publishing anything. - # - # Unset the `GITHUB_ACTIONS` environment variable to trick semantic-release into thinking it's not running in a CI environment, - # as `--no-ci` alone is insufficient. - # - # Use `--branches "${GITHUB_HEAD_REF}"` to consider the PR head ref (source branch) as a release one for the dry run. - - run: npx --no-install semantic-release --dry-run --no-ci --branches "${GITHUB_HEAD_REF}" + - run: | + GITHUB_REF=${{ github.head_ref }} + npx semantic-release --no-ci --dry-run --plugins @semantic-release/commit-analyzer,@semantic-release/release-notes-generator --branches ${{ github.head_ref }} env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} From 420c2e9eed5177366fa329a5615f1914e1f6d165 Mon Sep 17 00:00:00 2001 From: Florian Greinacher Date: Thu, 26 Feb 2026 15:01:40 +0100 Subject: [PATCH 11/11] ci: another try --- .github/workflows/release-preview.yml | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/.github/workflows/release-preview.yml b/.github/workflows/release-preview.yml index d12e9b54..7013a21a 100644 --- a/.github/workflows/release-preview.yml +++ b/.github/workflows/release-preview.yml @@ -16,14 +16,21 @@ jobs: steps: - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 with: - fetch-depth: 0 + fetch-depth: 0 # Required by semantic-release + # Use the pull request head ref (source branch) to ensure the dry run simulates a release for the current PR. + # LIMITATION: will probably not work with pull requests from forks forbidding read accesses. + ref: ${{ github.head_ref }} - uses: actions/setup-node@6044e13b5dc448c55e2357c09f80417699197238 # v6.2.0 with: cache: npm node-version: lts/* - run: npm ci + # Perform a dry run without publishing anything. + # + # Unset the `GITHUB_ACTIONS` environment variable to trick semantic-release into thinking it's not running in a CI environment, + # as `--no-ci` alone is insufficient. + # + # Use `--branches "${GITHUB_HEAD_REF}"` to consider the PR head ref (source branch) as a release one for the dry run. - run: | - GITHUB_REF=${{ github.head_ref }} - npx semantic-release --no-ci --dry-run --plugins @semantic-release/commit-analyzer,@semantic-release/release-notes-generator --branches ${{ github.head_ref }} - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + unset GITHUB_ACTIONS + npx --no-install semantic-release --dry-run --no-ci --branches "${GITHUB_HEAD_REF}" \ No newline at end of file