-
Notifications
You must be signed in to change notification settings - Fork 26
41 lines (35 loc) · 1.09 KB
/
version-bump.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
name: Version Bump
on:
push:
branches:
- main # Assuming version bumps happen on pushes to 'main'
jobs:
bump-version:
if: false
runs-on: ubuntu-latest
steps:
- name: Check out code
uses: actions/checkout@v4
with:
fetch-depth: 0 # Ensures history is available for versioning
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.x'
- name: Install Dependencies
run: |
python -m pip install --upgrade pip
# Install any dependencies you need for versioning script
# pip install ...
- name: Bump Version
run: |
# Script to bump version in pyproject.toml
# E.g., using Python to read, increment, and write back the version
python path/to/version_bump_script.py
- name: Commit and Push
run: |
git config --local user.email "[email protected]"
git config --local user.name "GitHub Action"
git add pyproject.toml
git commit -m "Increment version"
git push