Skip to content

Commit

Permalink
Fix publish
Browse files Browse the repository at this point in the history
  • Loading branch information
yeger00 committed Jan 5, 2025
1 parent 6e1645a commit 4418134
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 15 deletions.
26 changes: 11 additions & 15 deletions .github/workflows/publish.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ name: Publish to PyPI
"on":
release:
types: [published]
workflow_dispatch:

jobs:
deploy:
Expand All @@ -14,22 +15,17 @@ jobs:
steps:
- uses: actions/checkout@v4

- name: Install UV
run: |
curl -LsSf https://astral.sh/uv/install.sh | sh
echo "$HOME/.cargo/bin" >> $GITHUB_PATH
- name: Set up Python
uses: actions/setup-python@v5
- name: Install the latest version of uv
uses: astral-sh/setup-uv@v5
with:
python-version: "3.11"
version: "0.5.x"
python-version: 3.11
enable-cache: true
cache-dependency-glob: "uv.lock"

- name: Install build dependencies
- name: Build
run: |
uv pip install build
- name: Build package
run: python -m build
uv build
- name: Publish to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
- name: Publish
run: uv publish
5 changes: 5 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -22,3 +22,8 @@ test = [
[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"

[[tool.uv.index]]
name = "testpypi"
url = "https://test.pypi.org/simple/"
publish-url = "https://test.pypi.org/legacy/"

0 comments on commit 4418134

Please sign in to comment.