Skip to content

chore(release): 7.0.0-alpha.2 #3

chore(release): 7.0.0-alpha.2

chore(release): 7.0.0-alpha.2 #3

Workflow file for this run

name: Release
on:
push:
tags:
- 'v*'
jobs:
release:
name: Publish to npm
runs-on: ubuntu-latest
permissions:
contents: write
id-token: write
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 20
cache: npm
registry-url: https://registry.npmjs.org
- run: npm install -g npm@latest # trusted publishing requires npm >= 11.5.1
- run: npm ci
- run: npm run lint && npm run typecheck && npm test && npm run build
- name: Publish
run: |
VERSION="${GITHUB_REF_NAME#v}"
if [[ "$VERSION" == *-* ]]; then
# Prerelease (e.g. 7.0.0-alpha.1): do NOT tag as "latest"
npm publish --provenance --access public --tag next
else
npm publish --provenance --access public
fi
- uses: softprops/action-gh-release@v2
with:
generate_release_notes: true