1.0.0-rc.4 #5
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 Pre-releases | |
on: | |
push: | |
tags: | |
- 'v[0-9]+.[0-9]+.[0-9]+-alpha.[0-9]+' | |
- 'v[0-9]+.[0-9]+.[0-9]+-beta.[0-9]+' | |
- 'v[0-9]+.[0-9]+.[0-9]+-rc.[0-9]+' | |
jobs: | |
publish: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Set Tag env | |
run: echo "NPM_TAG=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV | |
- uses: actions/setup-node@v1 | |
with: | |
node-version: 18 | |
registry-url: 'https://registry.npmjs.org' | |
- run: npm ci | |
- run: npm run test | |
- run: npm run build:lib | |
- run: npm publish --tag alpha ./lib | |
if: contains(env.NPM_TAG, 'alpha') | |
- run: npm publish --tag beta ./lib | |
if: contains(env.NPM_TAG, 'beta') | |
- run: npm publish --tag rc ./lib | |
if: contains(env.NPM_TAG, 'rc') | |
env: | |
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} |