Skip to content

Commit 7be081d

Browse files
committed
fix: simplify npm publish in release workflow
- Remove redundant manual authentication and version checking logic from the release job. - Replace complex shell script with a standard npm publish command to ensure cleaner execution.
1 parent 4eabbdb commit 7be081d

1 file changed

Lines changed: 1 addition & 12 deletions

File tree

.github/workflows/release.yml

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -34,15 +34,4 @@ jobs:
3434
env:
3535
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
3636
run: |
37-
npm config set registry "https://registry.npmjs.org/"
38-
if [ -n "${NODE_AUTH_TOKEN:-}" ]; then
39-
npm config set //registry.npmjs.org/:_authToken "$NODE_AUTH_TOKEN"
40-
fi
41-
42-
PACKAGE_NAME=$(node -p "require('./package.json').name")
43-
PACKAGE_VERSION=$(node -p "require('./package.json').version")
44-
if npm view "$PACKAGE_NAME" version | grep -q "$PACKAGE_VERSION"; then
45-
echo "Version $PACKAGE_VERSION already exists on NPM. Skipping publish."
46-
else
47-
npm publish --provenance --access public --verbose
48-
fi
37+
npm publish

0 commit comments

Comments
 (0)