-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #183 from onebeyond/cd-action
Modify cd action
- Loading branch information
Showing
4 changed files
with
64 additions
and
41 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
name: NPM Publish | ||
|
||
on: | ||
release: | ||
types: [ created ] | ||
|
||
permissions: # added using https://github.com/step-security/secure-workflows | ||
contents: read | ||
|
||
jobs: | ||
publish-npm: | ||
runs-on: ubuntu-latest | ||
permissions: | ||
contents: read | ||
id-token: write | ||
|
||
steps: | ||
- name: 🔐 Harden Runner | ||
uses: step-security/harden-runner@eb238b55efaa70779f274895e782ed17c84f2895 # v2.6.1 | ||
with: | ||
disable-sudo: true | ||
egress-policy: block | ||
allowed-endpoints: > | ||
github.com:443 | ||
registry.npmjs.org:443 | ||
api.github.com:443 | ||
nodejs.org:443 | ||
- name: ⚙️ Git Checkout | ||
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 | ||
|
||
- name: ⚙️ Install Node versions | ||
uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 # v4.0.1 | ||
with: | ||
node-version: 20 | ||
registry-url: https://registry.npmjs.org | ||
|
||
- name: ⚙️ Install NPM last version | ||
run: npm install -g npm | ||
|
||
- name: ⚙️ Install dependencies | ||
run: npm ci | ||
|
||
- name: 📦 Publish in NPM registry | ||
run: | | ||
npm publish --provenance --ignore-scripts --access public | ||
env: | ||
NODE_AUTH_TOKEN: ${{ secrets.NPM_GUIDESMITHS }} |
This file was deleted.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters