Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit ce3812e

Browse files
committed
adding login and disabling scripts on publish
The latter is a security measure to ensure that no third-party scripts run during the publication process. This reduces the risk of a token exposure, during the publish process
1 parent cc1a5a3 commit ce3812e

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

‎.github/workflows/npm-publish.yml‎

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,13 @@ jobs:
4545
- name: npm install
4646
run: npm install
4747

48+
- name: npm login
49+
run: |
50+
npm config set //registry.npmjs.org/:_authToken ${{secrets.NPM_TOKEN}}
51+
npm publish --ignore-scripts
52+
53+
4854
- name: publish to npm
49-
run: npm publish . --tag ${{steps.get_package_json.outputs.prop}}@${{steps.get_package_version.outputs.prop}}
55+
run: npm publish . --tag ${{steps.get_package_json.outputs.prop}}@${{steps.get_package_version.outputs.prop}} --ignore-scripts
5056
env:
5157
NPM_TOKEN: ${{secrets.NPM_TOKEN}}

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /