diff --git a/.github/workflows/publish-pypi.yml b/.github/workflows/publish-pypi.yml index 130128f..11f40fe 100644 --- a/.github/workflows/publish-pypi.yml +++ b/.github/workflows/publish-pypi.yml @@ -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 }}))) @@ -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 @@ -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 }}