4.1.7-beta.4 #75
Workflow file for this run
This file contains hidden or 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
name: Build and Publish | |
on: | |
release: | |
types: [published] | |
jobs: | |
build-and-publish: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Check out code | |
uses: actions/checkout@v3 | |
- name: Set up Node.js | |
uses: actions/setup-node@v4 | |
with: | |
node-version: '18' | |
registry-url: 'https://registry.npmjs.org' | |
- name: Remove pnpm-lock.yaml | |
run: rm -rf pnpm-lock.yaml | |
- name: Install pnpm | |
run: npm install -g pnpm | |
- name: Install dependencies | |
run: pnpm install | |
- name: Check if beta release | |
id: check-beta | |
run: | | |
if [[ ${{ github.ref_name }} =~ -beta ]]; then | |
echo "IS_BETA=true" >> $GITHUB_OUTPUT | |
else | |
echo "IS_BETA=false" >> $GITHUB_OUTPUT | |
fi | |
- name: Release beta package | |
if: steps.check-beta.outputs.IS_BETA == 'true' | |
run: pnpm run release:beta | |
env: | |
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} | |
- name: Release stable package | |
if: steps.check-beta.outputs.IS_BETA == 'false' | |
run: pnpm run release | |
env: | |
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} |