-
Notifications
You must be signed in to change notification settings - Fork 2
46 lines (38 loc) · 1.37 KB
/
version.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
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 }}"