-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Update workflows * Change the way we ship * Need the version
- Loading branch information
1 parent
4ea9b15
commit 3df234a
Showing
5 changed files
with
25 additions
and
27 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,39 +1,45 @@ | ||
name: Upload Python Package | ||
|
||
on: | ||
push: | ||
tags: | ||
- "v*" | ||
release: | ||
types: ["plublished"] | ||
|
||
jobs: | ||
deploy: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Set up Python | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: "3.x" | ||
|
||
- name: Setup uv | ||
uses: astral-sh/setup-uv@v2 | ||
with: | ||
enable-cache: true | ||
uv-version: "0.4.9" | ||
|
||
- name: Install dependencies | ||
run: | | ||
python -m pip install --upgrade pip | ||
pip install setuptools wheel hatch | ||
hatch env create | ||
uv venv .venv | ||
uv pip install ".[dev]" | ||
- name: Make sure we didn't forget anything in pre-commit | ||
run: | | ||
hatch run pre-commit run --all | ||
uv run pre-commit run --all | ||
- name: Test with pytest | ||
run: | | ||
hatch run pytest | ||
uv run pytest | ||
- name: Build and publish | ||
env: | ||
HATCH_INDEX_USER: ${{ secrets.PYPI_USERNAME }} | ||
HATCH_INDEX_AUTH: ${{ secrets.PYPI_PASSWORD }} | ||
TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }} | ||
TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }} | ||
TWINE_NON_INTERACTIVE: "1" | ||
run: | | ||
hatch build | ||
hatch publish --no-prompt | ||
uv build | ||
uvx twine upload dist/* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters