From e29837f4f7b6906ce70003edd898a5cb39c313f6 Mon Sep 17 00:00:00 2001 From: phernandez Date: Fri, 15 Nov 2024 11:01:15 -0600 Subject: [PATCH] fix: push to pypi and github. Install uv in build_command for semantic_release --- .github/workflows/release.yml | 22 ++++++++++++++-------- pyproject.toml | 2 +- 2 files changed, 15 insertions(+), 9 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 74b355b2..fba25b1a 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -26,15 +26,21 @@ jobs: with: fetch-depth: 0 - - name: Install uv - run: | - curl -LsSf https://astral.sh/uv/install.sh | sh - echo "$HOME/.cargo/bin" >> $GITHUB_PATH - - name: Python Semantic Release + id: release uses: python-semantic-release/python-semantic-release@master with: github_token: ${{ secrets.GITHUB_TOKEN }} - pypi_token: ${{ secrets.PYPI_TOKEN }} - git_committer_name: github-actions - git_committer_email: github-actions@github.com \ No newline at end of file + + - name: Publish to PyPI + uses: pypa/gh-action-pypi-publish@v1 + if: steps.release.outputs.released == 'true' + with: + password: ${{ secrets.PYPI_TOKEN }} + + - name: Publish to GitHub Release Assets + uses: python-semantic-release/publish-action@v9.8.9 + if: steps.release.outputs.released == 'true' + with: + github_token: ${{ secrets.GITHUB_TOKEN }} + tag: ${{ steps.release.outputs.tag }} \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml index e4650d12..539b3172 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -149,7 +149,7 @@ version_toml = [ major_on_zero = false branch = "main" changelog_file = "CHANGELOG.md" -build_command = "uv build" +build_command = "pip install build && python -m build" dist_path = "dist/" upload_to_pypi = true commit_message = "chore(release): {version} [skip ci]" \ No newline at end of file