Bump Version and Sync Dependency in Monorepo #46
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: Bump Version and Sync Dependency in Monorepo | |
on: | |
workflow_dispatch: | |
inputs: | |
newVersion: | |
description: 'New version number for graphic-walker' | |
required: true | |
default: '1.0.1' | |
jobs: | |
bump-version: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Check out repository | |
uses: actions/checkout@v2 | |
- name: Setup Node.js | |
uses: actions/setup-node@v2 | |
with: | |
node-version: '18.x' # Adjust as per your project requirement | |
- name: Bump graphic-walker version | |
working-directory: ./packages/graphic-walker | |
run: | | |
yarn version --no-git-tag-version --new-version ${{ github.event.inputs.newVersion }} | |
- name: Update playground dependency | |
run: | | |
yarn add @kanaries/graphic-walker@${{ github.event.inputs.newVersion }} | |
working-directory: ./packages/playground | |
- name: Update Wasm dependecy | |
run: | | |
yarn add -D @kanaries/graphic-walker@${{ github.event.inputs.newVersion }} | |
working-directory: ./packages/duckdb-wasm-computation | |
- name: Commit Changes | |
run: | | |
git config --local user.email "[email protected]" | |
git config --local user.name "GitHub Action" | |
git add . | |
git commit -m "release: Update graphic-walker to ${{ github.event.inputs.newVersion }}" | |
- name: Create Pull Request | |
uses: peter-evans/create-pull-request@v3 | |
with: | |
commit-message: Sync graphic-walker and playground versions to ${{ github.event.inputs.newVersion }} | |
title: 'Sync graphic-walker and playground package versions to ${{ github.event.inputs.newVersion }}' | |
body: 'This is an auto-generated PR to update the graphic-walker version and its dependency in playground.' | |
branch: sync-versions-${{ github.event.inputs.newVersion }} # Branch to create the PR | |
labels: version-sync, automated pr |