Skip to content
Closed
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
59 changes: 58 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
name: CI
on: [push, pull_request]

on:
push:
branches: [master]
tags: ["v*"]
pull_request:
permissions:
contents: read

concurrency:
group: ${{ github.head_ref || github.run_id }}
Expand Down Expand Up @@ -52,3 +59,53 @@ jobs:
uv sync --frozen --extra test --extra cli
- name: Run tests
run: uv run --no-project pytest -nauto

publish:
if: startsWith(github.ref, 'refs/tags/v')
name: Release
runs-on: ubuntu-latest
needs: [test, linter]
strategy:
fail-fast: true # This one should `fail-fast`
environment: pypi
permissions:
# Use to sign the release artifacts
id-token: write
# Used to upload release artifacts
contents: write
# Used to generate artifact attestation
attestations: write
steps:
- name: Checkout Code Repository
uses: actions/checkout@v7

- name: Install uv
uses: astral-sh/setup-uv@v7
with:
python-version: 3.14

- name: Install Dependencies
run: uv sync --all-extras --frozen --dev

- name: Build the wheel artifact
run: |
uv build

- name: Upload wheels
uses: actions/upload-artifact@v7
with:
path: dist
if-no-files-found: error

- name: Generate artifact attestation
uses: actions/attest-build-provenance@v4
with:
subject-path: 'dist/*'

- name: Publish package distributions to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
print-hash: true
skip-existing: true
verbose: true
packages-dir: 'dist'
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ test = [
"inline-snapshot>=0.29.4,<1",
"parameterized>=0.9.0,<0.10",
"pip>=24.0",
"pytest>=8.0.0,<9.0.0",
"pytest>=8.0.0,<10.0.0",
"pytest-cov>=5.0.0,<6.0.0",
"pytest-mock>=3.14.0,<4.0.0",
"pytest-xdist>=3.7.0,<4.0.0",
Expand Down
61 changes: 37 additions & 24 deletions uv.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion variantlib/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from __future__ import annotations

__package_name__ = "variantlib"
__version__ = "0.0.3"
__version__ = "0.2.0"
Loading