Skip to content

yanni4night is publishing this project #6

yanni4night is publishing this project

yanni4night is publishing this project #6

Workflow file for this run

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 }}