Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
57 changes: 34 additions & 23 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,25 +53,11 @@ jobs:
print(f"Publishing from {ref}, matching project version {version}.")
PY

- name: Install build and test dependencies
run: |
python -m pip install --upgrade pip build twine pytest
- name: Install uv
uses: astral-sh/setup-uv@v8.1.0

- name: Build source and wheel distributions
run: |
python -m build

- name: Check built distributions
run: |
python -m twine check dist/*

- name: Install package from built wheel
run: |
python -m pip install --force-reinstall dist/*.whl

- name: Run Python tests
run: |
python -m pytest
run: uv build

- name: Upload built distributions
uses: actions/upload-artifact@v7
Expand All @@ -86,43 +72,68 @@ jobs:
needs: build
runs-on: ubuntu-latest
permissions:
contents: read
id-token: write
environment:
name: testpypi
url: https://test.pypi.org/project/stitchmeta/

steps:
- name: Checkout repository
uses: actions/checkout@v6

- name: Download built distributions
uses: actions/download-artifact@v8
with:
name: python-package-distributions
path: dist/

- name: Install uv
uses: astral-sh/setup-uv@v8.1.0

- name: Show downloaded files
run: |
pwd
ls -lah
ls -lah dist

- name: Publish distributions to TestPyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
repository-url: https://test.pypi.org/legacy/
run: |
uv publish --index testpypi \
--config-file ${{ github.workspace }}/pyproject.toml \
dist/*

publish-pypi:
name: Publish to PyPI
if: ${{ github.event_name == 'push' }}
needs: build
runs-on: ubuntu-latest
permissions:
contents: read
id-token: write
environment:
name: pypi
url: https://pypi.org/project/stitchmeta/

steps:
- name: Checkout repository
uses: actions/checkout@v6

- name: Download built distributions
uses: actions/download-artifact@v8
with:
name: python-package-distributions
path: dist/

- name: Install uv
uses: astral-sh/setup-uv@v8.1.0

- name: Show downloaded files
run: |
pwd
ls -lah
ls -lah dist

- name: Publish distributions to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
run: uv publish dist/*

github-release:
name: Create GitHub Release
Expand Down
7 changes: 4 additions & 3 deletions .readthedocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ version: 2
build:
os: ubuntu-24.04
tools:
python: "3.13"
python: "3.14"

sphinx:
configuration: doc/conf.py
Expand All @@ -12,7 +12,8 @@ formats: all

python:
install:
- method: pip
- method: uv
command: pip
path: .
extra_requirements:
extras:
- docs
6 changes: 6 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -65,3 +65,9 @@ python_version = "3.14"
warn_return_any = true
warn_unused_configs = true
exclude = "doc"

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