Skip to content

update version bump gha #35

update version bump gha

update version bump gha #35

Workflow file for this run

name: 'Bump Version'
# on:
# workflow_dispatch:
# inputs:
# bump-mode:
# description: 'Select bump mode'
# required: true
# default: 'patch'
# type: choice
# options:
# - patch
# - minor
# - major
on:
pull_request:
branches: ['**']
env:
PATCH: patch
GITHUB_PACKAGES_USER: ${{ github.actor }}
GITHUB_PACKAGES_TOKEN: ${{ secrets.PACKAGE_READ_PAT }}
jobs:
bump-version:
name: 'Bump Version on master'
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: 'Checkout source code'
uses: actions/checkout@v4
- name: 'Checkout version-bump-sdk branch'
run: |
git fetch origin version-bump && git checkout version-bump || git checkout -b version-bump
- name: Print Current Branch
run: echo "$(git branch --show-current)"
- name: 'print current version'
run: npm pkg get version
# - name: Bump SDK version and commit to version-bump branch
# run: |
# npm version ${{ inputs.bump-mode }} -m "update package to version %s [skip cli]"
# id: update
- name: Bump SDK version and commit to version-bump branch
run: |
chmod +x ./.ci_steps/version-bump.sh
./.ci_steps/version-bump.sh ${{ env.PATCH }}
- name: 'print updated version'
run: npm pkg get version