Skip to content

Commit f5a86cf

Browse files
committed
ci: update the auto publishing workflow
1 parent d611058 commit f5a86cf

1 file changed

Lines changed: 5 additions & 19 deletions

File tree

.github/workflows/create-release.yml

Lines changed: 5 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,10 @@ on:
44
push:
55
tags: ["v*.*.*"]
66

7+
permissions:
8+
id-token: write
9+
contents: read
10+
711
jobs:
812
run-eslint:
913
name: Run ESLint
@@ -112,6 +116,7 @@ jobs:
112116
uses: actions/setup-node@v6.0.0
113117
with:
114118
node-version: "25.x"
119+
registry-url: "https://registry.npmjs.org"
115120

116121
- name: Setup pnpm
117122
uses: pnpm/action-setup@v4.2.0
@@ -122,24 +127,5 @@ jobs:
122127
- name: Build the Package
123128
run: pnpm build
124129

125-
- name: Set the Publishing Config
126-
env:
127-
NODE_AUTH_TOKEN: "${{ secrets.NODE_AUTH_TOKEN }}"
128-
run: |
129-
pnpm config set '//registry.npmjs.org/:_authToken' "${NODE_AUTH_TOKEN}"
130-
pnpm config set '//registry.npmjs.org/:always-auth' true
131-
pnpm whoami
132-
133-
- name: Verify tag matches package version
134-
run: |
135-
PACKAGE_VERSION=$(node -p "require('./package.json').version")
136-
TAG_VERSION="${GITHUB_REF_NAME#v}"
137-
138-
if [ "$PACKAGE_VERSION" != "$TAG_VERSION" ]; then
139-
echo "Tag version ($TAG_VERSION) does not match package.json version \
140-
($PACKAGE_VERSION)"
141-
exit 1
142-
fi
143-
144130
- name: Publish the Package
145131
run: pnpm publish --access public --no-git-checks

0 commit comments

Comments
 (0)