Skip to content

Commit 90d6df2

Browse files
committed
ci: update GitHub workflows for version bump and release
1 parent 0b4b182 commit 90d6df2

File tree

2 files changed

+19
-19
lines changed

2 files changed

+19
-19
lines changed

.github/workflows/bump-version.yml

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -11,49 +11,49 @@ on:
1111
- major
1212
- minor
1313
- patch
14-
14+
1515
jobs:
1616
bump-version:
1717
runs-on: ubuntu-latest
1818
permissions:
1919
contents: write
2020
pull-requests: write
21-
21+
2222
steps:
2323
- name: Checkout code
2424
uses: actions/checkout@v4
2525
with:
2626
fetch-depth: 0
2727
token: ${{ secrets.GITHUB_TOKEN }}
28-
28+
2929
- name: Set up Python
3030
uses: actions/setup-python@v5
3131
with:
3232
python-version: '3.11'
33-
33+
3434
- name: Install bumpversion
3535
run: |
3636
python -m pip install --upgrade pip
3737
pip install bump2version
38-
38+
3939
- name: Configure git
4040
run: |
4141
git config --local user.email "github-actions[bot]@users.noreply.github.com"
4242
git config --local user.name "github-actions[bot]"
43-
43+
4444
- name: Get current version
4545
id: current_version
4646
run: |
4747
echo "version=$(grep current_version .bumpversion.cfg | cut -d '=' -f 2 | tr -d ' ')" >> $GITHUB_OUTPUT
48-
48+
4949
- name: Bump version
5050
id: bump_version
5151
run: |
5252
# Use --no-tag to prevent creating a tag (we'll tag after PR merge)
5353
# Use --no-commit to let create-pull-request handle the commit
5454
bump2version ${{ github.event.inputs.version_part }} --no-tag --no-commit
5555
echo "new_version=$(grep current_version .bumpversion.cfg | cut -d '=' -f 2 | tr -d ' ')" >> $GITHUB_OUTPUT
56-
56+
5757
- name: Create Pull Request
5858
id: create_pr
5959
uses: peter-evans/create-pull-request@v5
@@ -63,18 +63,18 @@ jobs:
6363
title: "chore: bump version from ${{ steps.current_version.outputs.version }} to ${{ steps.bump_version.outputs.new_version }}"
6464
body: |
6565
## Version Bump
66-
66+
6767
This PR bumps the version from `${{ steps.current_version.outputs.version }}` to `${{ steps.bump_version.outputs.new_version }}`.
68-
68+
6969
### Changes
7070
- Updated version in `setup.py`
7171
- Updated version in `docs/conf.py`
7272
- Updated version in `src/datapilot/__init__.py`
7373
- Updated version in `.bumpversion.cfg`
74-
74+
7575
### Type of change
7676
- Version bump (${{ github.event.inputs.version_part }})
77-
77+
7878
---
7979
*This PR was automatically created by the bump version workflow.*
8080
branch: bump-version-${{ steps.bump_version.outputs.new_version }}

.github/workflows/tag-release.yml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -10,38 +10,38 @@ jobs:
1010
runs-on: ubuntu-latest
1111
permissions:
1212
contents: write
13-
13+
1414
steps:
1515
- name: Checkout code
1616
uses: actions/checkout@v4
1717
with:
1818
fetch-depth: 0
19-
19+
2020
- name: Set up Python
2121
uses: actions/setup-python@v5
2222
with:
2323
python-version: '3.11'
24-
24+
2525
- name: Install dependencies
2626
run: |
2727
python -m pip install --upgrade pip
2828
pip install tox twine wheel setuptools
29-
29+
3030
- name: Get version from file
3131
id: get_version
3232
run: |
3333
echo "version=$(grep current_version .bumpversion.cfg | cut -d '=' -f 2 | tr -d ' ')" >> $GITHUB_OUTPUT
34-
34+
3535
- name: Create and push tag
3636
run: |
3737
git config --local user.email "github-actions[bot]@users.noreply.github.com"
3838
git config --local user.name "github-actions[bot]"
3939
git tag -a "v${{ steps.get_version.outputs.version }}" -m "Release version ${{ steps.get_version.outputs.version }}"
4040
git push origin "v${{ steps.get_version.outputs.version }}"
41-
41+
4242
- name: Make release script executable
4343
run: chmod +x release.sh
44-
44+
4545
- name: Publish to PyPI
4646
env:
4747
TWINE_USERNAME: __token__

0 commit comments

Comments
 (0)