Skip to content

Commit

Permalink
chore: use an app for bumping cli versions (#588)
Browse files Browse the repository at this point in the history
  • Loading branch information
pavelgj authored Jul 11, 2024
1 parent 4b42565 commit a1a1735
Showing 1 changed file with 18 additions and 24 deletions.
42 changes: 18 additions & 24 deletions .github/workflows/bump-cli-version.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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@'

0 comments on commit a1a1735

Please sign in to comment.