Create Release PR #340
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: Create release PR | |
on: | |
workflow_dispatch: | |
inputs: | |
versionBump: | |
description: 'which version to bump eg: prerelease, patch' | |
required: true | |
type: choice | |
default: 'prerelease' | |
options: | |
- prerelease | |
- patch | |
jobs: | |
create_pr: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Validate branch | |
if: github.event.inputs.versionBump != 'prerelease' && github.ref != 'refs/heads/dev' | |
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: 'ci: update versions for release' | |
title: 'ci: update versions for release' | |
body: | | |
- @100mslive/hms-video-store - ${{ steps.version.outputs.store_version }} | |
branch: ci/release | |
branch-suffix: short-commit-hash | |
delete-branch: true |