-
Notifications
You must be signed in to change notification settings - Fork 1
53 lines (44 loc) · 1.35 KB
/
bump-version.yml
File metadata and controls
53 lines (44 loc) · 1.35 KB
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
46
47
48
49
50
51
52
53
name: Bump Version
on:
workflow_dispatch:
inputs:
bump:
description: 'Version bump type'
required: true
default: 'patch'
type: choice
options:
- patch
- minor
- major
jobs:
bump-version:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
persist-credentials: true
fetch-depth: 0
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.11'
- name: Bump version
run: python bump_version.py ${{ github.event.inputs.bump }}
- name: Read bumped version
id: version
run: echo "version=$(cat VERSION)" >> $GITHUB_OUTPUT
- name: Commit updated version files
run: |
git config user.name "github-actions[bot]"
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
git add VERSION backend/pyproject.toml frontend/package.json
git commit -m "chore(release): bump version to ${{ steps.version.outputs.version }}"
git push
- name: Create and push Git tag
run: |
git tag v${{ steps.version.outputs.version }}
git push origin v${{ steps.version.outputs.version }}