-
Notifications
You must be signed in to change notification settings - Fork 28
55 lines (48 loc) · 1.81 KB
/
create-release-pr.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
43
44
45
46
47
48
49
50
51
52
53
54
55
name: Create release PR
on:
workflow_dispatch:
inputs:
versionBump:
description: 'which version to bump eg: prerelease, patch'
required: true
default: 'prerelease'
jobs:
create_pr:
runs-on: ubuntu-latest
steps:
- name: Validate branch
if: github.event.inputs.versionBump != 'prerelease' && github.ref != 'refs/heads/main'
run: exit 1
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Configure Git user
run: |
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
git config user.name "github-actions[bot]"
- name: Install packages
run: yarn install --frozen-lockfile
- name: Update versions
env:
BUMP: ${{ github.event.inputs.versionBump }}
run: |
yarn global add lerna@5
lerna -v
echo $(lerna version $BUMP --no-git-tag-version --exact --yes --no-private)
lerna add @100mslive/hms-video-store --peer --scope=@100mslive/hms-virtual-background --exact
lerna add @100mslive/roomkit-react --scope=prebuilt-react-integration --exact
- name: Get current version
id: version
run: |
STORE_VERSION=$(cd packages/hms-video-store && node -p -e "require('./package.json').version")
echo $STORE_VERSION
echo "::set-output name=store_version::$(echo $STORE_VERSION)"
- uses: peter-evans/create-pull-request@v4
with:
commit-message: 'build: update versions for release'
title: 'build: update versions for release'
body: |
- @100mslive/hms-video-store - ${{ steps.version.outputs.store_version }}
branch: release
branch-suffix: short-commit-hash
delete-branch: true