Skip to content

6.0.0-rc1

6.0.0-rc1 #2

Workflow file for this run

name: npm publish
on:
release:
types: [published]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- id: get-nvmrc
run: echo VERSION=$(cat .nvmrc) >> $GITHUB_OUTPUT
- id: get-tag
run: |
if [[ $GITHUB_REF =~ [0-9]+.[0-9]+.[0-9]+$ ]]; then
echo TAG=latest >> $GITHUB_OUTPUT
else
echo TAG=beta >> $GITHUB_OUTPUT
fi
- uses: actions/setup-node@v3
with:
registry-url: https://registry.npmjs.org
node-version: ${{ steps.get-nvmrc.outputs.VERSION }}
- run: npm ci
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_REGISTRY_KEY }}
- run: npm run test
- run: npm run build
- run: npm version ${{ github.event.release.tag_name }} --no-git-tag-version
- run: npm publish --tag ${{ steps.get-tag.outputs.TAG }}
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_REGISTRY_KEY }}