-
Notifications
You must be signed in to change notification settings - Fork 26
Update dlclive requirement & add deploy workflow #48
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 15 commits
0b26c85
05497e8
1cc7801
ae9550c
21a7e28
3ca5d4c
002e06b
3611774
502e16e
d79eec4
de9de7f
7f5b75b
6d21bd2
756836b
6893b69
6d7a3e6
7230f69
58bb304
d21cd3e
70284db
4c5f8e1
0a72842
cf51c1f
09a8364
a42d496
caef5a8
892da6a
5dd22ba
3dfb1de
e066d9b
fa49240
03dcb8e
8ec0de1
2784bd5
9fd192e
0daebba
cfd67c7
b6fd336
58f6110
f495649
f2c5fb6
d8da888
94a4d04
eb255db
48b274c
31e09d8
e517aed
c7b11c9
4865edb
1f73c89
0b47bc4
1cf1945
6952b68
559c775
025a18e
735b9a0
af06d09
873ad07
2510076
f8c0999
0d0ed39
1a795b9
e94ffb9
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,110 @@ | ||
| name: Build, validate & Release | ||
|
|
||
| on: | ||
| push: | ||
| tags: | ||
| - 'v*.*.*' | ||
| pull_request: | ||
| branches: | ||
| - main | ||
| - public | ||
| types: | ||
| - labeled | ||
| - opened | ||
| - edited | ||
| - synchronize | ||
| - reopened | ||
|
|
||
| jobs: | ||
| build_check: | ||
| name: Build & validate package | ||
| runs-on: ubuntu-latest | ||
| strategy: | ||
| fail-fast: false | ||
| matrix: | ||
| python-version: [ "3.10", "3.11", "3.12" ] # adjust to what you support | ||
| steps: | ||
| - name: Checkout | ||
| uses: actions/checkout@v6 | ||
|
|
||
| - name: Setup Python ${{ matrix.python-version }} | ||
| uses: actions/setup-python@v6 | ||
| with: | ||
| python-version: ${{ matrix.python-version }} | ||
|
|
||
| # If we use UV later, the lock file should be included here for caching and validation | ||
| - name: Cache pip | ||
| uses: actions/cache@v4 | ||
| with: | ||
| path: ~/.cache/pip | ||
| key: ${{ runner.os }}-pip-${{ matrix.python-version }}-${{ hashFiles('pyproject.toml', 'setup.cfg', 'setup.py', 'requirements.txt') }} | ||
| restore-keys: | | ||
| ${{ runner.os }}-pip-${{ matrix.python-version }}- | ||
| ${{ runner.os }}-pip- | ||
|
|
||
| - name: Install build tools | ||
| run: | | ||
| python -m pip install --upgrade pip | ||
| python -m pip install build twine wheel "packaging>=24.2" | ||
|
|
||
| - name: Build distributions (sdist + wheel) | ||
| run: python -m build | ||
|
|
||
| - name: Inspect dist | ||
| run: | | ||
| ls -lah dist/ | ||
| echo "sdist contents (first ~200 entries):" | ||
| tar -tf dist/*.tar.gz | sed -n '1,200p' | ||
|
|
||
| - name: Twine metadata & README check | ||
| run: python -m twine check dist/* | ||
|
|
||
| - name: Install from wheel & smoke test | ||
| run: | | ||
| # Install from the built wheel (not from the source tree) | ||
| python -m pip install dist/*.whl | ||
|
|
||
| python - <<'PY' | ||
| import importlib | ||
| pkg_name = "dlclivegui" # change if your top-level import differs | ||
| m = importlib.import_module(pkg_name) | ||
| print("Imported:", m.__name__, "version:", getattr(m, "__version__", "n/a")) | ||
| PY | ||
|
|
||
| if ! command -v dlclivegui >/dev/null 2>&1; then | ||
| echo "CLI entry point 'dlclivegui' not found in PATH; skipping CLI smoke test." | ||
| else | ||
| echo "Running 'dlclivegui --help' smoke test..." | ||
| if ! dlclivegui --help >/dev/null 2>&1; then | ||
| echo "::error::'dlclivegui --help' failed; this indicates a problem with the installed CLI package." | ||
| exit 1 | ||
| fi | ||
| fi | ||
|
|
||
| publish: | ||
| name: Publish to PyPI | ||
| runs-on: ubuntu-latest | ||
| needs: build_check | ||
| if: ${{ startsWith(github.ref, 'refs/tags/v') }} # only on tag pushes like v1.2.3 | ||
| steps: | ||
| - name: Checkout | ||
| uses: actions/checkout@v4 | ||
|
|
||
| - name: Setup Python | ||
| uses: actions/setup-python@v5 | ||
| with: | ||
| python-version: "3.x" | ||
|
|
||
| - name: Install build tools | ||
| run: | | ||
| python -m pip install --upgrade pip | ||
| python -m pip install build twine | ||
|
|
||
| - name: Build distributions (sdist + wheel) | ||
| run: python -m build | ||
|
|
||
| - name: Publish to PyPI | ||
| env: | ||
| TWINE_USERNAME: __token__ | ||
| TWINE_PASSWORD: ${{ secrets.TWINE_API_KEY }} | ||
| run: python -m twine upload --verbose dist/* | ||
|
C-Achard marked this conversation as resolved.
Outdated
|
||
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -24,3 +24,4 @@ | |||||
| "CameraConfigDialog", | ||||||
| "main", | ||||||
| ] | ||||||
| __version__ = "2.0.0rc0" # PLACEHOLDER | ||||||
|
||||||
| __version__ = "2.0.0rc0" # PLACEHOLDER | |
| __version__ = "2.0.0rc0" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Leaving open as reminder
Uh oh!
There was an error while loading. Please reload this page.