Skip to content

release: update version to 2.1.0-beta.7 #51

release: update version to 2.1.0-beta.7

release: update version to 2.1.0-beta.7 #51

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