From 6cb5cedf84644e6408a485af53cc79eab20f6bfa Mon Sep 17 00:00:00 2001 From: paytoncain Date: Fri, 5 Apr 2024 00:56:35 -0600 Subject: [PATCH] Build and release python package --- .github/workflows/maven.yml | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) diff --git a/.github/workflows/maven.yml b/.github/workflows/maven.yml index 454ce54c..13a9a415 100644 --- a/.github/workflows/maven.yml +++ b/.github/workflows/maven.yml @@ -39,6 +39,35 @@ jobs: with: name: reflection-config path: "pace-cli/target/classes/native-reflection-configuration.json" + - name: Prepare Python Module + run: "touch pace-data/target/generated-sources/python/pacedata/__init__.py && cp pace-data/target/classes/python/setup.py pace-data/target/generated-sources/python/." + - name: Upload Python Module + uses: actions/upload-artifact@v4 + with: + name: python-module + path: "pace-data/target/generated-sources/python" + + package-python: + needs: build + runs-on: ubuntu-latest + steps: + - name: Download Python Module + uses: actions/download-artifact@v4 + with: + name: python-module + - name: Set up Python + uses: actions/setup-python@v3 + with: + python-version: '3.x' + - name: Install Python Dependencies + run: python -m pip install --upgrade pip && python -m pip install setuptools + - name: Build Python Package + run: python setup.py sdist + - name: Upload Python Package + uses: actions/upload-artifact@v4 + with: + name: python-package + path: "dist/*.tar.gz" native-image: needs: build @@ -76,6 +105,7 @@ jobs: needs: - build - native-image + - package-python runs-on: ubuntu-latest steps: - uses: actions/download-artifact@v4 @@ -83,6 +113,7 @@ jobs: - run: zip -r release/pace-cli-Linux-X64-${{ needs.build.outputs.version }}.zip pace-cli-Linux-X64 - run: zip -r release/pace-cli-macOS-ARM64-${{ needs.build.outputs.version }}.zip pace-cli-macOS-ARM64 - run: zip -r release/pace-cli-macOS-X64-${{ needs.build.outputs.version }}.zip pace-cli-macOS-X64 + - run: cp python-package/*.tar.gz release/. - run: cp exe-jar/pace-cli-${{ needs.build.outputs.version }}-jar-with-dependencies.jar release/pace-cli-${{ needs.build.outputs.version }}.jar - name: Update branch release uses: eine/tip@master