forked from finos/legend-studio
-
Notifications
You must be signed in to change notification settings - Fork 0
42 lines (40 loc) · 1.45 KB
/
manual__prepare-new-release.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
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/checkout@v3.5.3
- 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/cache@v3.3.1
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/setup-node@v3.7.0
with:
node-version: 16
- 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