rigsby-core 0.3.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,64 @@
1
+ # Tests on every pull request and push to main; on a version tag (v0.3.0), builds the package and
2
+ # publishes it to PyPI. It publishes with PYPI_API_TOKEN, a secret of the `pypi` environment (which needs
3
+ # a reviewer's approval): trusted publishing doesn't match this organization's OIDC subject format
4
+ # (repo:owner@id/repo@id) yet.
5
+ name: CI
6
+
7
+ on:
8
+ pull_request:
9
+ push:
10
+ branches: [main]
11
+ tags: ["v*"]
12
+ workflow_dispatch:
13
+
14
+ permissions:
15
+ contents: read
16
+
17
+ jobs:
18
+ test:
19
+ runs-on: ${{ matrix.os }}
20
+ strategy:
21
+ fail-fast: false
22
+ matrix:
23
+ os: [ubuntu-latest, macos-latest]
24
+ steps:
25
+ - uses: actions/checkout@v4
26
+ - uses: astral-sh/setup-uv@v6
27
+ - run: uv sync --python 3.12
28
+ - run: uv run pytest -q
29
+
30
+ build:
31
+ runs-on: ubuntu-latest
32
+ steps:
33
+ - uses: actions/checkout@v4
34
+ - uses: astral-sh/setup-uv@v6
35
+ - name: The tag matches the package version
36
+ if: startsWith(github.ref, 'refs/tags/v')
37
+ run: |
38
+ want="${GITHUB_REF_NAME#v}"
39
+ got=$(grep -m1 '^version = ' pyproject.toml | cut -d'"' -f2)
40
+ [ "$got" = "$want" ] || { echo "pyproject.toml is $got, the tag is $want"; exit 1; }
41
+ - name: Build and check
42
+ run: |
43
+ uv build --no-sources --out-dir dist
44
+ uvx twine check --strict dist/*
45
+ - uses: actions/upload-artifact@v4
46
+ with:
47
+ name: dist
48
+ path: dist/
49
+
50
+ publish:
51
+ if: startsWith(github.ref, 'refs/tags/v')
52
+ needs: [test, build]
53
+ runs-on: ubuntu-latest
54
+ environment:
55
+ name: pypi
56
+ url: https://pypi.org/project/rigsby-core/
57
+ steps:
58
+ - uses: actions/download-artifact@v4
59
+ with:
60
+ name: dist
61
+ path: dist/
62
+ - uses: pypa/gh-action-pypi-publish@release/v1
63
+ with:
64
+ password: ${{ secrets.PYPI_API_TOKEN }}
@@ -0,0 +1,6 @@
1
+ __pycache__/
2
+ *.pyc
3
+ .venv/
4
+ dist/
5
+ .pytest_cache/
6
+ .env