Skip to content

release: update version to 2.1.0-beta.8 #53

release: update version to 2.1.0-beta.8

release: update version to 2.1.0-beta.8 #53

Workflow file for this run

# https://help.github.com/en/actions/reference/workflow-syntax-for-github-actions
name: Release for tag
on:
push:
tags:
- v*
jobs:
release:
runs-on: ubuntu-latest
permissions:
# needed for npm provenance data generation
# https://docs.npmjs.com/generating-provenance-statements#publishing-packages-with-provenance-via-github-actions
id-token: write
env:
# https://github.com/chalk/supports-color/blob/main/index.js#L21
# https://github.com/chalk/supports-color/blob/main/index.js#L54
FORCE_COLOR: true
steps:
- name: Checkout
# https://github.com/actions/checkout
uses: actions/checkout@v3
with:
# Number of commits to fetch. 0 indicates all history.
fetch-depth: 1
- name: Prepare for building
uses: ./.github/actions/prepare
- name: Build Packages
run: |
pnpm build:packages
- name: Publish to npm
# https://docs.github.com/en/actions/guides/publishing-nodejs-packages#publishing-packages-to-the-npm-registry
id: publish-to-npm
env:
# need set in GitHub repo - settings - secrets
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
# https://docs.npmjs.com/generating-provenance-statements#using-third-party-package-publishing-tools
NPM_CONFIG_PROVENANCE: true
run: |
echo 'Show .npmrc'
cat ./.npmrc
echo ''
if [[ "${GITHUB_REF##*/}" =~ .*-beta ]]; then
echo "Publishing beta version..."
pnpm publish -r --report-summary --tag beta
else
echo "Publishing latest version..."
pnpm publish -r --report-summary
fi
echo ''
echo 'Show pnpm-publish-summary.json'
echo ''
cat pnpm-publish-summary.json