diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index bec1163..fa06953 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -1,30 +1,31 @@ name: "Publish Package" on: - push: - tags: - - 0.* + pull_request: + types: [ closed ] + branches: [ main ] jobs: - run: - runs-on: ubuntu-latest - environment: - name: pypi - permissions: - id-token: write - contents: read - steps: - - name: Checkout - uses: actions/checkout@v5 - - name: Install uv - uses: astral-sh/setup-uv@v6 - - name: Install Python 3.13 - run: uv python install 3.13 - - name: Build - run: uv build - - name: Smoke test (wheel) - run: uv run --isolated --no-project --with dist/*.whl tests/smoke_test.py - - name: Smoke test (source distribution) - run: uv run --isolated --no-project --with dist/*.tar.gz tests/smoke_test.py - - name: Publish - run: uv publish + run: + runs-on: ubuntu-latest + if: github.event.pull_request.merged == true + environment: + name: pypi + permissions: + id-token: write + contents: read + steps: + - name: Checkout + uses: actions/checkout@v5 + - name: Install uv + uses: astral-sh/setup-uv@v6 + - name: Install Python 3.13 + run: uv python install 3.13 + - name: Build + run: uv build + - name: Smoke test (wheel) + run: uv run --isolated --no-project --with dist/*.whl tests/smoke_test.py + - name: Smoke test (source distribution) + run: uv run --isolated --no-project --with dist/*.tar.gz tests/smoke_test.py + - name: Publish + run: uv publish diff --git a/CHANGELOG.md b/CHANGELOG.md index ae21c9b..67f9c1f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,9 @@ +## 0.8.1 (2026-05-06) + +### Fix + +- **smoke_test**: fix error with smoke test code + ## 0.8.0 (2026-05-06) ### Feat diff --git a/tests/smoke_test.py b/tests/smoke_test.py index cb7b754..7ce61a1 100644 --- a/tests/smoke_test.py +++ b/tests/smoke_test.py @@ -24,8 +24,3 @@ def test_basic_imports(): print(msg) except Exception as e: raise RuntimeError("Smoke test failed") from e - - if test_basic_imports(): - print(msg) - else: - raise RuntimeError("Smoke test failed")