Release New Version #1
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: Release go-VersionBump | |
on: | |
workflow_dispatch: # Manual trigger, adjust as needed | |
inputs: | |
bumpType: | |
description: 'Version bump type' | |
required: true | |
type: choice | |
options: | |
- major | |
- minor | |
- patch | |
- pre | |
- new-pre-major | |
- new-pre-minor | |
- new-pre-patch | |
- pre-build | |
- pre-major | |
- pre-minor | |
- pre-patch | |
- pre-build | |
jobs: | |
release: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Display initiator | |
run: echo "This workflow was triggered by $GITHUB_ACTOR" | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
- name: Set up Go | |
uses: actions/setup-go@v4 | |
with: | |
go-version: '1.22.2' | |
- name: Install versionbump | |
run: | | |
go install github.com/ptgoetz/go-versionbump/cmd/[email protected] | |
echo "Versionbump installed successfully." | |
- name: Bump version | |
run: | | |
git config --global user.email "[email protected]" | |
git config --global user.name "P. Taylor Goetz" | |
echo "Running on branch ${{ github.ref }}" | |
# versionbump ${{ github.event.inputs.bumpType }} --no-prompt | |
echo "Version bumped successfully." | |
git push origin main --tags |