Skip to content

Commit 4d27105

Browse files
committed
fix(ci): add trusted publishing comment & no_release flag
1 parent bfdbed8 commit 4d27105

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

.github/workflows/ci.yaml

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -27,13 +27,14 @@ jobs:
2727
version: 10
2828
run_install: false
2929

30-
- name: Install Node.js
31-
uses: actions/setup-node@v4
30+
- uses: actions/setup-node@v4
3231
with:
3332
node-version: 20
3433
registry-url: 'https://registry.npmjs.org'
3534
cache: 'pnpm'
3635

36+
# Trusted publishing requires npm CLI version 11.5.1 or later.
37+
# https://docs.npmjs.com/trusted-publishers
3738
- run: npm install -g npm@latest
3839

3940
- run: pnpm install
@@ -59,7 +60,7 @@ jobs:
5960
const version = semver.parse('$version');
6061
version.major += 1;
6162
62-
version.format()
63+
version.format();
6364
")
6465
6566
version_tag=$(node -p "require('semver').parse('$version')?.prerelease[0] || 'latest'")
@@ -71,5 +72,5 @@ jobs:
7172
7273
- run: pnpm build
7374

74-
- if: github.ref == 'refs/heads/main'
75+
- if: github.ref == 'refs/heads/main' && !contains(github.event.head_commit.message, 'no_release')
7576
run: pnpm publish --no-git-checks --tag ${{ env.version_tag }}

0 commit comments

Comments
 (0)