diff --git a/.github/workflows/bump-cli-version.yml b/.github/workflows/bump-cli-version.yml index 2f49e76beb..fad0a4a21d 100644 --- a/.github/workflows/bump-cli-version.yml +++ b/.github/workflows/bump-cli-version.yml @@ -12,7 +12,7 @@ # See the License for the specific language governing permissions and # limitations under the License. -name: Bump and Tag CLI Version +name: Bump CLI Version on: workflow_dispatch: @@ -32,27 +32,21 @@ jobs: name: Version bump runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 - - uses: pnpm/action-setup@v3 - - name: Set up node v20 - uses: actions/setup-node@v4 + - name: 'genkit-tools/common version bump' + uses: 'phips28/gh-action-bump-version@master' + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + PACKAGEJSON_DIR: genkit-tools/common with: - node-version: 20.x - cache: 'pnpm' - # bump version - - run: pnpm version ${{ inputs.releaseType }} - working-directory: ./genkit-tools/common - - run: pnpm version ${{ inputs.releaseType }} - working-directory: ./genkit-tools/cli - # commit new versions, tag and push - # assumption is that genkit and @genkit-ai/tools-common package versions are always in sync. - - name: Commit version bump - working-directory: ./genkit-tools/cli - run: | - CLI_VERSION=$(node -e "console.log(require('./package.json')['version'])") - git config --global user.name 'Genkit releaser' - git commit -am "chore: bump CLI version to $CLI_VERSION" - git tag genkit@$CLI_VERSION - git tag @genkit-ai/tools-common@$CLI_VERSION - git push - git push --tags + default: ${{ inputs.releaseType }} + commit-message: 'chore: bump @genkit-ai/tools-common version to {{version}}' + tag-prefix: '@genkit-ai/tools-common@' + - name: 'genkit-tools/common version bump' + uses: 'phips28/gh-action-bump-version@master' + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + PACKAGEJSON_DIR: genkit-tools/cli + with: + default: ${{ inputs.releaseType }} + commit-message: 'chore: bump CLI version to {{version}}' + tag-prefix: 'genkit@'