Skip to content

Bump Version

Bump Version #2

Workflow file for this run

name: Bump Version
on:
workflow_dispatch:
inputs:
version_type:
description: "Version increment type (patch, minor, major)"
required: true
default: patch
type: choice
options:
- patch
- minor
- major
jobs:
test:
uses: ./.github/workflows/test_job.yml

Check failure on line 18 in .github/workflows/bumpversion.yml

View workflow run for this annotation

GitHub Actions / .github/workflows/bumpversion.yml

Invalid workflow file

error parsing called workflow ".github/workflows/bumpversion.yml" -> "./.github/workflows/test_job.yml" : failed to fetch workflow: workflow was not found.
secrets:
GINKGOAI_API_KEY: ${{ secrets.GINKGOAI_API_KEY }}
bump_version:
runs-on: ubuntu-latest
needs: [test]
steps:
# Checkout the code
- name: Checkout code
uses: actions/checkout@v4
# Set up Python
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.12"
# Install dependencies
- name: Install dependencies
run: |
pip install bumpversion setuptools wheel build
# Run bumpversion
- name: Bump version
run: |
bumpversion --allow-dirty ${{ github.event.inputs.version_type }}
NEW_VERSION=$(cat .bumpversion.cfg | grep current_version | cut -d'=' -f2 | tr -d ' ')
echo "New version is $NEW_VERSION"
env:
GIT_AUTHOR_NAME: "github-actions[bot]"
GIT_AUTHOR_EMAIL: "github-actions[bot]@users.noreply.github.com"
# Push changes and tag
- name: Push changes and tag
run: |
git push origin HEAD
git push origin --tags
# Create GitHub release
- name: Create release
uses: actions/create-release@v1
with:
tag_name: v${{ steps.bump_version.outputs.NEW_VERSION }}
release_name: v${{ steps.bump_version.outputs.NEW_VERSION }}
draft: false
prerelease: false
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}