Publish new release #25
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: Publish new release | |
on: | |
release: | |
types: [ published ] | |
jobs: | |
release: | |
name: Create NPM release | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
ref: ${{ github.event.release.target_commitish }} | |
- name: Use Node.js 12 | |
uses: actions/setup-node@v4 | |
with: | |
node-version: 18 | |
registry-url: https://registry.npmjs.org/ | |
- run: npm ci --verbose | |
- run: git config --global user.name "GitHub CD bot" | |
- run: git config --global user.email "[email protected]" | |
- run: npm --no-git-tag-version version ${{ github.event.release.tag_name }} | |
# - run: npm run build | |
# - run: npm run test | |
- run: npm publish --verbose --access public --tag latest | |
env: | |
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} | |
- run: git add package.json | |
- run: git commit -m 'Bump version' | |
- run: git push | |
env: | |
github-token: ${{ secrets.GITHUB_TOKEN }} |