Skip to content

Commit

Permalink
ci: test and release in/from main
Browse files Browse the repository at this point in the history
  • Loading branch information
dimaqq committed Feb 21, 2025
1 parent 4cda6cb commit 8881f62
Showing 1 changed file with 49 additions and 0 deletions.
49 changes: 49 additions & 0 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
on:
push:
branches: [main]
pull_request:
branches: [main]

jobs:
ci:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version: [3.8, 3.9, "3.10", 3.11, 3.12, 3.13, 3.13t, 3.14]
dep-versions: [--frozen, "--resolution lowest", "--resolution highest"]
steps:
- uses: actions/checkout@v4
- uses: astral-sh/setup-uv@v5
- run: |
uv python install ${{ matrix.python-version }}
uv sync --all-groups ${{ matrix.dep-versions }}
uv pip install .
uv pip freeze
uv run pytest
uv run pyright
uv run ruff check
uv build
release:
needs: ci
runs-on: ubuntu-latest
environment: release
permissions:
id-token: write
steps:
- uses: actions/checkout@v4
- uses: astral-sh/setup-uv@v5
- run: |
uv build --sdist --wheel
rm -vf dist/.gitignore # https://github.com/astral-sh/uv/issues/11652
- uses: pypa/gh-action-pypi-publish@release/v1
with:
repository-url: https://test.pypi.org/legacy/
skip-existing: true
verbose: true
- run: rm -f dist/*.attestation # should I parametrise release instead?
- uses: pypa/gh-action-pypi-publish@release/v1
with:
skip-existing: true
verbose: true

0 comments on commit 8881f62

Please sign in to comment.