release: update version to v2.0.0-beta.2 #40
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
# 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 | |
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 }} | |
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 |