Skip to content

6.0.0-beta.13

6.0.0-beta.13 #143

Workflow file for this run

name: Release
on:
release:
types: [published]
jobs:
release_to_npm:
name: Release to npm
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Use Node.js 22.x
uses: actions/setup-node@v4
with:
node-version: 22.x
cache: 'npm'
cache-dependency-path: 'package-lock.json'
- run: npm i -g npm@9
- run: npm ci
- run: npm run build-serial
env:
NODE_OPTIONS: --max_old_space_size=4096
- run: npm test
- run: npm run lint
- run: echo //registry.npmjs.org/:_authToken=${NPM_TOKEN} > .npmrc
env:
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
- run: git update-index --assume-unchanged .npmrc
- name: Determine npm tag based on release version
id: get_npm_tag
run: |
TAG_NAME="${{ github.ref_name }}"
NPM_TAG_VALUE="latest" # Default tag
if [[ "$TAG_NAME" == *alpha* || "$TAG_NAME" == *beta* || "$TAG_NAME" == *pre* ]]; then
NPM_TAG_VALUE="next"
fi
echo "NPM_TAG=${NPM_TAG_VALUE}" >> $GITHUB_ENV
echo "Determined NPM_TAG: ${NPM_TAG_VALUE}"
- run: npx nx release publish --tag=$NPM_TAG
- if: always()
run: rm .npmrc