Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 17 additions & 11 deletions .github/workflows/publish-pypi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,11 @@ jobs:
- name: Set up Python
run: uv python install 3.12

- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: '22'

- name: Update versions with build number
run: |
BUILD_NUMBER=$(printf "%04d" $(($VERSION_OFFSET + ${{ github.run_number }})))
Expand All @@ -40,17 +45,7 @@ jobs:
sed -i "s/^version = \".*\"/version = \"$VERSION\"/" "$pkg"
done

echo "Updated versions to $VERSION"

- name: Commit version changes
run: |
BUILD_NUMBER=$(printf "%04d" $(($VERSION_OFFSET + ${{ github.run_number }})))
VERSION="${VERSION_PREFIX}.${BUILD_NUMBER}"
git config user.name "github-actions[bot]"
git config user.email "github-actions[bot]@users.noreply.github.com"
git add pyproject.toml packages/*/pyproject.toml
git commit -m "Bump version to $VERSION [skip ci]" || echo "No changes to commit"
git push origin master
echo "Publishing version $VERSION to PyPI"

- name: Build all packages
run: uv build --all-packages
Expand All @@ -59,3 +54,14 @@ jobs:
env:
UV_PUBLISH_TOKEN: ${{ secrets.PYPI_API_TOKEN }}
run: uv publish

- name: Create GitHub Release
env:
GH_TOKEN: ${{ github.token }}
run: |
BUILD_NUMBER=$(printf "%04d" $(($VERSION_OFFSET + ${{ github.run_number }})))
VERSION="${VERSION_PREFIX}.${BUILD_NUMBER}"
gh release create "v$VERSION" \
--title "Release $VERSION" \
--notes "Automated release $VERSION" \
--repo ${{ github.repository }}