Skip to content

Version Workflow

Version Workflow #17

Workflow file for this run

name: Version Workflow
on:
workflow_dispatch:
inputs:
version:
description: 'Select the version type'
required: true
type: choice
default: 'patch'
options:
- major
- minor
- patch
- dev
jobs:
build:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
- run: pip install -r dev-requirements.txt
- name: set Old Version
run: |
echo "OLD_VERSIONE=$(bump-my-version show current_version)" >> $GITHUB_ENV
- name: Bump Version
run: bump-my-version bump ${{ github.event.inputs.version }}
- name: set Current Version
run: |
echo "TAG_NAME=$(bump-my-version show current_version)" >> $GITHUB_ENV
- name: Commit and Tag
uses: stefanzweifel/git-auto-commit-action@v5
with:
tagging_message: v${{ env.TAG_NAME }}
commit_message: "Bump version: ${{ env.OLD_VERSIONE }} -> ${{ env.TAG_NAME }}"