Skip to content

Commit 6f69fbb

Browse files
committed
build: bump version to 1.2.6 and connect release workflows
1 parent daf94d9 commit 6f69fbb

File tree

4 files changed

+64
-6
lines changed

4 files changed

+64
-6
lines changed

.github/workflows/publish.yml

Lines changed: 56 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,25 +9,71 @@
99
name: Upload Python Package
1010

1111
on:
12-
release:
13-
types: [published, created, released]
12+
workflow_run:
13+
workflows: ["Auto Release"]
14+
types:
15+
- completed
1416

1517
permissions:
1618
contents: read
1719

1820
jobs:
21+
check-workflow:
22+
runs-on: ubuntu-latest
23+
if: ${{ github.event.workflow_run.conclusion == 'success' }}
24+
outputs:
25+
version: ${{ steps.get-version.outputs.version }}
26+
should_publish: ${{ steps.check-release.outputs.should_publish }}
27+
28+
steps:
29+
- uses: actions/checkout@v4
30+
with:
31+
fetch-depth: 0
32+
ref: ${{ github.event.workflow_run.head_branch }}
33+
34+
- name: Get version from pyproject.toml
35+
id: get-version
36+
run: |
37+
VERSION=$(grep -m 1 "version = " pyproject.toml | sed 's/version = "\(.*\)"/\1/')
38+
echo "version=$VERSION" >> $GITHUB_OUTPUT
39+
echo "Current version: $VERSION"
40+
41+
- name: Check if release should be published
42+
id: check-release
43+
run: |
44+
# Check if most recent commit was a version bump
45+
COMMIT_MSG=$(git log -1 --pretty=%B)
46+
if [[ "$COMMIT_MSG" =~ [Bb][Uu][Mm][Pp]\ [Vv][Ee][Rr][Ss][Ii][Oo][Nn] ]]; then
47+
echo "should_publish=true" >> $GITHUB_OUTPUT
48+
echo "Version bump detected, should publish to PyPI"
49+
else
50+
echo "should_publish=false" >> $GITHUB_OUTPUT
51+
echo "Not a version bump commit, skipping PyPI publishing"
52+
fi
53+
54+
- name: Debug workflow info
55+
run: |
56+
echo "Auto-Release workflow completed successfully"
57+
echo "Version to publish: ${{ steps.get-version.outputs.version }}"
58+
echo "Should publish: ${{ steps.check-release.outputs.should_publish }}"
59+
1960
release-build:
2061
runs-on: ubuntu-latest
62+
needs: check-workflow
63+
if: ${{ needs.check-workflow.outputs.should_publish == 'true' }}
2164

2265
steps:
2366
- uses: actions/checkout@v4
67+
with:
68+
ref: ${{ github.event.workflow_run.head_branch }}
2469

2570
- uses: actions/setup-python@v5
2671
with:
27-
python-version: "3.x"
72+
python-version: "3.11"
2873

2974
- name: Build release distributions
3075
run: |
76+
python -m pip install --upgrade pip
3177
python -m pip install build
3278
python -m build
3379
@@ -40,7 +86,9 @@ jobs:
4086
pypi-publish:
4187
runs-on: ubuntu-latest
4288
needs:
89+
- check-workflow
4390
- release-build
91+
if: ${{ needs.check-workflow.outputs.should_publish == 'true' }}
4492
environment:
4593
name: pypi
4694

@@ -56,4 +104,8 @@ jobs:
56104
with:
57105
password: ${{ secrets.PYPI_TOKEN }}
58106
packages-dir: dist/
59-
verbose: true
107+
verbose: true
108+
109+
- name: Publish success
110+
run: |
111+
echo "✅ Successfully published version ${{ needs.check-workflow.outputs.version }} to PyPI"

CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
# Changelog
22

3+
## [1.2.6] - 2025-03-05
4+
### 🛠️ Fixes
5+
- Connect Auto Release and Package Publishing workflows
6+
- Automate PyPI package publishing after GitHub release
7+
- Fix workflow integration between GitHub release and PyPI publish
8+
39
## [1.2.5] - 2025-03-05
410
### 🛠️ Fixes
511
- Use actions/create-release instead of softprops/action-gh-release to ensure proper release event triggering

commitloom/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
from .core.git import GitError, GitFile, GitOperations
66
from .services.ai_service import AIService, CommitSuggestion, TokenUsage
77

8-
__version__ = "1.2.5"
8+
__version__ = "1.2.6"
99
__author__ = "Petru Arakiss"
1010
__email__ = "petruarakiss@gmail.com"
1111

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[tool.poetry]
22
name = "commitloom"
3-
version = "1.2.5"
3+
version = "1.2.6"
44
description = "Weave perfect git commits with AI-powered intelligence"
55
authors = ["Petru Arakiss <petruarakiss@gmail.com>"]
66
readme = "README.md"

0 commit comments

Comments
 (0)