v1.1.0 #5
Workflow file for this run
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
name: "NPM Publish" | |
on: | |
release: | |
types: [created] | |
jobs: | |
build: | |
name: Build | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: 20 | |
registry-url: https://registry.npmjs.org/ | |
# Skip post-install scripts here, as a malicious | |
# script could steal NODE_AUTH_TOKEN. | |
- name: Install NPM dependencies | |
run: npm install --ignore-scripts | |
- name: Run linting | |
run: npm run lint | |
- name: Run tests | |
run: npm run test-ci | |
publish-npm: | |
name: NPM Publish | |
needs: build | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: 20 | |
registry-url: https://registry.npmjs.org/ | |
# Skip post-install scripts here, as a malicious | |
# script could steal NODE_AUTH_TOKEN. | |
- name: Install NPM dependencies | |
run: npm install --ignore-scripts --production | |
- name: Run NPM publish | |
run: npm publish --access public | |
env: | |
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN_SYNATIC}} |