Skip to content

Commit

Permalink
chore(ci): use uv to build and publish the package
Browse files Browse the repository at this point in the history
  • Loading branch information
nijel committed Oct 4, 2024
1 parent a3fa4b4 commit c1407e9
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
7 changes: 3 additions & 4 deletions .github/workflows/setup.yml
Original file line number Diff line number Diff line change
Expand Up @@ -107,9 +107,8 @@ jobs:
- name: Install Python dependencies
run: |
uv pip install --system $(sed -n 's/.*"\(twine==\([^"]*\)\)".*/\1/p' pyproject.toml)
uv pip install --system $(sed -n 's/.*"\(build==\([^"]*\)\)".*/\1/p' pyproject.toml)
- name: build
run: python -m build
run: uv build
- name: Twine check
run: twine check dist/*
- name: Sign the dists with Sigstore
Expand Down Expand Up @@ -173,8 +172,8 @@ jobs:
- name: Cleanup dist
# Remove files not supported on PyPI (eg. Sigstore signatures)
run: find dist -mindepth 1 -not -name '*.tar.gz' -not -name '*.whl' -delete
- name: Publish package distributions to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
- uses: astral-sh/setup-uv@v3
- run: uv publish --trusted-publishing always

publish_github:
if: github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags/weblate')
Expand Down
1 change: 0 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,6 @@ antispam = [
"python-akismet>=0.4.2,<0.5"
]
ci = [
"build==1.2.2",
"coverage==7.6.1",
"twine==5.1.1"
]
Expand Down

0 comments on commit c1407e9

Please sign in to comment.