@@ -43,29 +43,29 @@ jobs:
4343 run : |
4444 uv run pytest test_cloudcheck.py -v
4545
46- # publish:
47- # runs-on: ubuntu-latest
48- # needs: test
49- # if: github.event_name == 'push' && github.ref == 'refs/heads/stable'
50- # steps:
51- # - uses: actions/checkout@v6
52- # - name: Set up Python
53- # uses: actions/setup-python@v6
54- # with:
55- # python-version: "3.x"
56- # - name: Set up Rust
57- # uses: dtolnay/rust-toolchain@stable
58- # - name: Set up uv
59- # uses: astral-sh/setup-uv@v7
60- # - name: Build PyPi package
61- # run: uv run maturin build --release --out dist
62- # - name: Publish PyPi package
63- # # TODO: Remove || true
64- # run: uv run maturin publish --username __token__ --password ${{ secrets.PYPI_TOKEN }} || true
46+ publish :
47+ runs-on : ubuntu-latest
48+ needs : test
49+ if : github.event_name == 'push' && github.ref == 'refs/heads/stable'
50+ steps :
51+ - uses : actions/checkout@v6
52+ - name : Set up Python
53+ uses : actions/setup-python@v6
54+ with :
55+ python-version : " 3.x"
56+ - name : Set up Rust
57+ uses : dtolnay/rust-toolchain@stable
58+ - name : Set up uv
59+ uses : astral-sh/setup-uv@v7
60+ - name : Build PyPi package
61+ run : uv run maturin build --release --out dist
62+ - name : Publish PyPi package
63+ # TODO: Remove || true
64+ run : uv run maturin publish --username __token__ --password ${{ secrets.PYPI_TOKEN }} || true
6565 linux :
6666 runs-on : ${{ matrix.platform.runner }}
67- # needs: publish
68- # if: github.event_name == 'push' && github.ref == 'refs/heads/stable'
67+ needs : publish
68+ if : github.event_name == 'push' && github.ref == 'refs/heads/stable'
6969 strategy :
7070 matrix :
7171 platform :
@@ -115,8 +115,8 @@ jobs:
115115
116116 musllinux :
117117 runs-on : ${{ matrix.platform.runner }}
118- # needs: publish
119- # if: github.event_name == 'push' && github.ref == 'refs/heads/stable'
118+ needs : publish
119+ if : github.event_name == 'push' && github.ref == 'refs/heads/stable'
120120 strategy :
121121 matrix :
122122 platform :
@@ -165,8 +165,8 @@ jobs:
165165
166166 windows :
167167 runs-on : ${{ matrix.platform.runner }}
168- # needs: publish
169- # if: github.event_name == 'push' && github.ref == 'refs/heads/stable'
168+ needs : publish
169+ if : github.event_name == 'push' && github.ref == 'refs/heads/stable'
170170 strategy :
171171 matrix :
172172 platform :
@@ -194,8 +194,8 @@ jobs:
194194
195195 macos :
196196 runs-on : ${{ matrix.platform.runner }}
197- # needs: publish
198- # if: github.event_name == 'push' && github.ref == 'refs/heads/stable'
197+ needs : publish
198+ if : github.event_name == 'push' && github.ref == 'refs/heads/stable'
199199 strategy :
200200 matrix :
201201 platform :
@@ -222,8 +222,8 @@ jobs:
222222
223223 sdist :
224224 runs-on : ubuntu-latest
225- # needs: publish
226- # if: github.event_name == 'push' && github.ref == 'refs/heads/stable'
225+ needs : publish
226+ if : github.event_name == 'push' && github.ref == 'refs/heads/stable'
227227 steps :
228228 - uses : actions/checkout@v6
229229 - name : Build sdist
@@ -237,28 +237,28 @@ jobs:
237237 name : wheels-sdist
238238 path : dist
239239
240- # release:
241- # name: Release
242- # runs-on: ubuntu-latest
243- # needs: [linux, musllinux, windows, macos, sdist]
244- # if: github.event_name == 'push' && github.ref == 'refs/heads/stable'
245- # permissions:
246- # # Use to sign the release artifacts
247- # id-token: write
248- # # Used to upload release artifacts
249- # contents: write
250- # # Used to generate artifact attestation
251- # attestations: write
252- # steps:
253- # - uses: actions/download-artifact@v7
254- # - name: Generate artifact attestation
255- # uses: actions/attest-build-provenance@v3
256- # with:
257- # subject-path: 'wheels-*/*'
258- # - name: Publish to PyPI
259- # uses: PyO3/maturin-action@v1
260- # env:
261- # MATURIN_PYPI_TOKEN: ${{ secrets.PYPI_TOKEN }}
262- # with:
263- # command: upload
264- # args: --non-interactive --skip-existing wheels-*/*
240+ release :
241+ name : Release
242+ runs-on : ubuntu-latest
243+ needs : [linux, musllinux, windows, macos, sdist]
244+ if : github.event_name == 'push' && github.ref == 'refs/heads/stable'
245+ permissions :
246+ # Use to sign the release artifacts
247+ id-token : write
248+ # Used to upload release artifacts
249+ contents : write
250+ # Used to generate artifact attestation
251+ attestations : write
252+ steps :
253+ - uses : actions/download-artifact@v7
254+ - name : Generate artifact attestation
255+ uses : actions/attest-build-provenance@v3
256+ with :
257+ subject-path : ' wheels-*/*'
258+ - name : Publish to PyPI
259+ uses : PyO3/maturin-action@v1
260+ env :
261+ MATURIN_PYPI_TOKEN : ${{ secrets.PYPI_TOKEN }}
262+ with :
263+ command : upload
264+ args : --non-interactive --skip-existing wheels-*/*
0 commit comments