Skip to content

Various improvements #132

Various improvements

Various improvements #132

Workflow file for this run

name: Python Wheel
on:
push:
branches: ["*"]
tags: ["v*.*.*"] # and run on tags that describe new versions
pull_request:
types: [opened, reopened, synchronize]
jobs:
build-sdist-and-wheel:
runs-on: ubuntu-latest
timeout-minutes: 30
steps:
- uses: actions/checkout@v6
- name: Setup uv
uses: ./.github/actions/setup-uv
- name: Build sdist and wheel
run: uv build
- name: Check wheel content
run: |
uvx check-wheel-contents dist/
uvx twine check dist/*
- name: Test wheel # TODO: replace this by using tox or nox
run: |
uv pip uninstall .
uv pip install dist/rydstate*.whl
uv run --no-project pytest
- name: Upload wheels
uses: actions/upload-artifact@v6
with:
name: dist
path: dist/rydstate*
publish-to-testpypi:
name: Publish to TestPyPI
if: startsWith(github.ref, 'refs/tags/') # only publish to TestPyPI on tag pushes
needs: [build-sdist-and-wheel]
runs-on: ubuntu-latest
timeout-minutes: 15
environment:
name: testpypi
url: https://test.pypi.org/p/rydstate
permissions:
id-token: write
steps:
- name: Download all the dists
uses: actions/download-artifact@v7
with:
path: dist
pattern: dist
merge-multiple: true
- name: Publish distribution to TestPyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
packages-dir: dist/
repository-url: https://test.pypi.org/legacy/