File tree Expand file tree Collapse file tree 1 file changed +20
-0
lines changed
Expand file tree Collapse file tree 1 file changed +20
-0
lines changed Original file line number Diff line number Diff line change 1818 with :
1919 python-version : " 3.11"
2020
21+ - name : Extract version from tag
22+ id : get_version
23+ run : |
24+ # Get tag from release event or use ref for workflow_dispatch
25+ if [ "${{ github.event_name }}" = "release" ]; then
26+ TAG="${{ github.event.release.tag_name }}"
27+ else
28+ TAG="${{ github.ref_name }}"
29+ fi
30+ # Remove 'v' prefix if present
31+ VERSION="${TAG#v}"
32+ echo "VERSION=$VERSION" >> $GITHUB_OUTPUT
33+ echo "Extracted version: $VERSION"
34+
35+ - name : Update version in pyproject.toml
36+ run : |
37+ sed -i "s/^version = .*/version = \"${{ steps.get_version.outputs.VERSION }}\"/" pyproject.toml
38+ echo "Updated pyproject.toml:"
39+ grep "^version" pyproject.toml
40+
2141 - name : Install build tooling
2242 run : |
2343 python -m pip install --upgrade pip
You can’t perform that action at this time.
0 commit comments