Skip to content

UpdateVersion

UpdateVersion #13

Workflow file for this run

name: UpdateVersion
on:
workflow_dispatch:
inputs:
version_type:
description: Version Type
required: true
default: patch
type: choice
options:
- major
- minor
- patch
dry_run:
description: Dry Run
required: false
default: false
type: boolean
jobs:
update_version:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Update Version
run: |
chmod +x .github/scripts/update_version.sh
new_version=$(.github/scripts/update_version.sh ${{ github.event.inputs.version_type }})
echo "New version is $new_version"
echo "new_version=$new_version" >> $GITHUB_ENV
- name: Create Git Tag
if: ${{ github.event.inputs.dry_run == 'false' }}
run: |
git config --global user.name "GitHub Actions"
git config --global user.email "[email protected]"
git tag ${{ env.new_version }}
git push origin ${{ env.new_version }}
- name: Debug Dry Run
run: echo "Dry run is ${{ github.event.inputs.dry_run }}"