5.0.2 #60
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: Npm.js deploy | |
on: | |
release: | |
types: [created] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: actions/setup-node@v2 | |
with: | |
node-version: '18' | |
cache: 'npm' | |
registry-url: 'https://registry.npmjs.org' | |
- run: echo "VERSION=${GITHUB_REF/refs\/tags\//}" >> $GITHUB_ENV | |
- run: echo ${VERSION} | |
- run: npm ci | |
- name: Build the package | |
run: npm run build:publish | |
- name: Define npm tag | |
run: | | |
if [[ ${VERSION} == *"alpha"* || ${VERSION} == *"beta"* || ${VERSION} == *"rc"* ]]; then echo "NPM_TAG=next"; else echo "NPM_TAG=latest"; fi >> $GITHUB_ENV | |
echo ${NPM_TAG} | |
- name: Version the package | |
run: npm version ${VERSION} --no-git-tag-version --save --verbose | |
working-directory: dist | |
- name: Publish the package | |
run: npm publish --tag ${NPM_TAG} | |
working-directory: dist | |
env: | |
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}} |