diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 039aba2..06ac239 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -29,18 +29,19 @@ jobs: - run: git reset --hard ${{ github.sha }} + - name: Install uv + uses: astral-sh/setup-uv@c771a70e6277c0a99b617c7a806ffedaca235ff9 # v9.0.0 + - name: Python Semantic Release id: release - uses: python-semantic-release/python-semantic-release@v10.6.2 - with: - github_token: ${{ secrets.OPENEDX_SEMANTIC_RELEASE_GITHUB_TOKEN }} - git_committer_name: "github-actions" - git_committer_email: "github-actions@github.com" - changelog: "false" - # Commit, tag, push and build, but don't create the GitHub release. - # We create it ourselves in the next step so that the distributions - # are attached before the release is published. See that step for why. - vcs_release: "false" + env: + GH_TOKEN: ${{ secrets.OPENEDX_SEMANTIC_RELEASE_GITHUB_TOKEN }} + GIT_COMMIT_AUTHOR: "github-actions " + run: | + git config --global user.name "github-actions" + git config --global user.email "github-actions@github.com" + uvx --from "python-semantic-release==10.6.2" \ + semantic-release -v version --no-changelog --no-vcs-release # This repo has immutable releases enabled, which freezes a release's # assets the moment it is published, so assets cannot be attached diff --git a/pyproject.toml b/pyproject.toml index a45187b..e979892 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -93,7 +93,7 @@ local_scheme = "no-local-version" fallback_version = "0.0.0" [tool.semantic_release] -build_command = "python -m pip install --upgrade build && SETUPTOOLS_SCM_PRETEND_VERSION=$NEW_VERSION python -m build" +build_command = "SETUPTOOLS_SCM_PRETEND_VERSION=$NEW_VERSION uv build" major_on_zero = false allow_zero_version = true tag_format = "v{version}"