-
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
base: cy/pre-release-fixes-2.0
Are you sure you want to change the base?
Changes from all commits
0b26c85
05497e8
1cc7801
ae9550c
21a7e28
3ca5d4c
002e06b
3611774
502e16e
d79eec4
de9de7f
7f5b75b
6d21bd2
756836b
6893b69
6d7a3e6
7230f69
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/* | ||
|
Comment on lines
+106
to
+110
|
||
| 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
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.
Within this workflow,
build_checkusesactions/checkout@v6/setup-python@v6butpublishuses older majors. Aligning action major versions across jobs improves reproducibility and reduces maintenance overhead (or add a comment explaining whypublishmust remain on older majors).