v2.5.1 #11
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 CD | |
on: | |
release: | |
types: [published] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
with: | |
ref: ${{ github.event.release.target_commitish }} | |
- name: Use Node.js | |
uses: actions/setup-node@v1 | |
with: | |
node-version: 16 | |
registry-url: https://registry.npmjs.org/ | |
- run: npm ci | |
- run: git config --global user.name "GitHub CD bot" | |
- run: git config --global user.email "github-cd-bot@example.com" | |
- run: npm version ${{ github.event.release.tag_name }} | |
- run: npm run build | |
- run: npm test | |
- run: npm run publish:dist --tag ${{ github.event.release.target_commitish }} | |
env: | |
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} | |
- run: git push | |
env: | |
github-token: ${{ secrets.GITHUB_TOKEN }} |