Update version to 0.1.0-alpha.0 #1
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 compass-web to NPM | |
on: | |
workflow_dispatch: | |
push: | |
tags: | |
- 'v*' | |
jobs: | |
publish: | |
permissions: | |
contents: read | |
id-token: write | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: 20 | |
cache: 'npm' | |
registry-url: 'https://registry.npmjs.org' | |
- run: npm ci | |
- name: Build compass-web | |
run: | | |
NODE_ENV=production npm run build | |
NODE_ENV=production npm run build-server | |
- name: Publish compass-web | |
env: | |
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} | |
run: | | |
TAG="${GITHUB_REF##*/}" | |
if [[ "$TAG" == *alpha* ]]; then | |
npm publish --tag alpha --access public | |
elif [[ "$TAG" == *beta* ]]; then | |
npm publish --tag beta --access public | |
elif [[ "$TAG" == *rc* ]]; then | |
npm publish --tag rc --access public | |
else | |
npm publish --access public | |
fi |