(Manual) Prepare New Release #416
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
name: (Manual) Prepare New Release | |
on: | |
workflow_dispatch: | |
inputs: | |
bump_type: | |
description: 'Version Bump Type (major/minor)' | |
required: true | |
default: 'minor' | |
jobs: | |
prepare-new-release: | |
# There is currently no way to limit workflow dispatch to only allow default branch | |
# so we need to restrict it here | |
# See https://github.community/t/limit-branch-for-workflow-dispatch/122099 | |
if: github.ref == 'refs/heads/master' && github.repository == 'finos/legend-studio' | |
name: Prepare New Release | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/[email protected] | |
- name: Get Yarn cache directory path | |
id: yarn-cache-dir-path | |
run: echo "dir=$(yarn config get cacheFolder)" >> $GITHUB_OUTPUT | |
- name: Setup Yarn cache | |
uses: actions/[email protected] | |
id: yarn-cache | |
with: | |
path: ${{ steps.yarn-cache-dir-path.outputs.dir }} | |
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }} | |
restore-keys: ${{ runner.os }}-yarn- | |
- name: Setup Node | |
uses: actions/[email protected] | |
with: | |
node-version: 21 | |
- name: Install dependencies | |
run: yarn | |
- name: Create PR for new release version bump | |
env: | |
BUMP_TYPE: ${{ github.event.inputs.bump_type }} | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
run: node ./scripts/release/createVersionBumpChangesetPR.js |