4747 generateReleaseNotes : true
4848 commit : ${{ github.sha }}
4949
50- build-and-publish :
50+ build-and-publish-py-moose-lib :
5151 runs-on : ubuntu-latest
52+ if : ${{ !inputs.dry-run }}
5253 needs :
5354 - version
5455 steps :
7374 package-and-publish-independant-ts-package :
7475 name : Package and Publish Independant TS Package
7576 runs-on : ubuntu-20.04
77+ if : ${{ !inputs.dry-run }}
7678 needs :
7779 - version
7880 permissions :
@@ -196,13 +198,19 @@ jobs:
196198 cargo set-version ${{ needs.version.outputs.version }}
197199 working-directory : ./apps/framework-cli
198200
199- - name : Build
200- uses : actions-rs/cargo@v1
201+ - name : Build wheels
202+ uses : PyO3/maturin-action@v1
203+ with :
204+ target : ${{ matrix.build.TARGET }}
205+ args : --release --features rdkafka/cmake-build --locked --target ${{ matrix.build.TARGET }} --out dist
206+ sccache : " true"
207+ working-directory : ./apps/framework-cli
208+
209+ - name : Upload wheels
210+ uses : actions/upload-artifact@v4
201211 with :
202- command : build
203- # --features rdkafka/cmake-build is necessary for cross compilation builds
204- args : --manifest-path ./apps/framework-cli/Cargo.toml --features rdkafka/cmake-build --release --locked --target ${{ matrix.build.TARGET }}
205- use-cross : ${{ matrix.build.OS == 'ubuntu-20.04' }} # use `cross` for Linux builds
212+ name : wheels-linux-${{ matrix.build.TARGET }}
213+ path : ./apps/framework-cli/dist
206214
207215 - name : Install node
208216 uses : actions/setup-node@v4
@@ -228,6 +236,23 @@ jobs:
228236 artifacts : |
229237 ./target/${{ matrix.build.TARGET }}/release/moose-cli-${{ matrix.build.TARGET }}
230238
239+ release-python :
240+ name : Release
241+ runs-on : ubuntu-latest
242+ needs : [build-and-publish-binaries]
243+ if : ${{ !inputs.dry-run }}
244+ steps :
245+ - uses : actions/download-artifact@v4
246+ - name : Publish to PyPI
247+ uses : PyO3/maturin-action@v1
248+ env :
249+ MATURIN_PYPI_TOKEN : __token__
250+ MATURIN_PASSWORD : ${{ secrets.PYPI_API_TOKEN }}
251+ with :
252+ command : upload
253+ args : --non-interactive --skip-existing wheels-*/*
254+ working-directory : ./apps/framework-cli
255+
231256 publish-npm-base :
232257 name : Publish the base NPM package
233258 needs :
0 commit comments