yanni4night is publishing this project #6
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-npm | |
run-name: ${{ github.actor }} is publishing this project | |
on: | |
release: | |
types: [published] | |
jobs: | |
publish: | |
if: ${{ startsWith(github.ref, 'refs/tags/v') }} | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Tag npm release (default, latest) | |
run: echo "NPM_TAG=latest" >> $GITHUB_ENV | |
- name: Tag npm release (next) | |
if: ${{ contains(github.ref, 'next') }} | |
run: echo "NPM_TAG=next" >> $GITHUB_ENV | |
- uses: actions/setup-node@v3 | |
with: | |
node-version: '18' | |
registry-url: 'https://registry.npmjs.org' | |
- run: npm ci | |
- run: npm publish --access public --tag $NPM_TAG | |
env: | |
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} |