Update version in all workspaces #28
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: Update version in all workspaces | |
on: | |
workflow_dispatch: | |
inputs: | |
branch_name: | |
type: string | |
description: XX_X Branch name (23_2+) | |
required: true | |
version: | |
type: string | |
description: XX.X.X Set exact version | |
required: true | |
jobs: | |
update_version: | |
name: Update version and create PR | |
runs-on: ubuntu-latest | |
steps: | |
- name: Get sources | |
uses: actions/checkout@v4 | |
with: | |
ref: ${{ inputs.branch_name }} | |
- name: Use Node.js | |
uses: actions/setup-node@v4 | |
with: | |
node-version: '20' | |
- uses: pnpm/action-setup@v3 | |
with: | |
version: 9 | |
run_install: false | |
- name: Get pnpm store directory | |
shell: bash | |
run: | | |
echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV | |
- uses: actions/cache@v4 | |
name: Setup pnpm cache | |
with: | |
path: | | |
${{ env.STORE_PATH }} | |
.nx/cache | |
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }} | |
restore-keys: | | |
${{ runner.os }}-pnpm-store | |
- name: Install dependencies | |
run: | | |
corepack enable | |
pnpm install | |
- name: Setup git config | |
run: | | |
git config --global user.email "[email protected]" | |
git config --global user.name "DX Robot" | |
- name: Bump version | |
run: pnpm run all:update-version -- ${{ inputs.version }} | |
- name: Commit changes and make PR | |
env: | |
GITHUB_TOKEN: ${{ secrets.DX_ROBOT_PAT }} | |
branch_name: 'robot/update-version-${{ inputs.version }}' | |
run: | | |
git checkout -b $branch_name | |
git add . -N | |
git commit -a -m "Bump devextreme version" | |
git push --set-upstream origin $branch_name --force | |
gh pr create --base ${{ inputs.branch_name }} --title "Bump devextreme version (${{ inputs.version }})" --body "Bump devextreme version" --reviewer DevExpress/devextreme-devops | |