Skip to content

prepare 2.4.0 release #11

prepare 2.4.0 release

prepare 2.4.0 release #11

Workflow file for this run

name: Release
on:
push:
tags:
- '*'
jobs:
linux:
name: Build Linux native binaries
runs-on: ubuntu-latest
environment: publish
permissions:
contents: write
steps:
- name: Checkout project
uses: actions/checkout@v3
with:
lfs: true
submodules: true
- name: Set up JDK
uses: actions/setup-java@v3
with:
distribution: 'temurin'
java-version: '17'
- name: Setup CMake
uses: lukka/get-cmake@latest
- name: Setup Python
uses: actions/setup-python@v4
with:
python-version: '3.10'
- name: Build native lib
run: ./gradlew buildNativeProject
- name: Upload Linux native lib artifacts
uses: actions/upload-artifact@v4
with:
name: linux-native-libs
path: |
*/src/main/resources/de/fabmax/physxjni/linux/*.so
*/src/main/resources/de/fabmax/physxjni/linux/*.so.sha1
compression-level: 0
windows:
name: Build Windows native binaries
runs-on: windows-latest
environment: publish
permissions:
contents: write
steps:
- name: Checkout project
uses: actions/checkout@v3
with:
lfs: true
submodules: true
- name: Set up JDK
uses: actions/setup-java@v3
with:
distribution: 'temurin'
java-version: '17'
- name: Setup CMake
uses: lukka/get-cmake@latest
- name: Setup Python
uses: actions/setup-python@v4
with:
python-version: '3.10'
- name: Build native lib
run: ./gradlew buildNativeProject
- name: Upload Windows native lib artifacts
uses: actions/upload-artifact@v4
with:
name: windows-native-libs
path: |
*/src/main/resources/de/fabmax/physxjni/windows/*.dll
*/src/main/resources/de/fabmax/physxjni/windows/*.dll.sha1
compression-level: 0
macos:
name: Build MacOS native binaries
runs-on: macos-latest
environment: publish
permissions:
contents: write
steps:
- name: Checkout project
uses: actions/checkout@v3
with:
lfs: true
submodules: true
- name: Set up JDK
uses: actions/setup-java@v3
with:
distribution: 'temurin'
java-version: '17'
- name: Install coreutils
run: brew install coreutils
- name: Setup CMake
uses: lukka/get-cmake@latest
- name: Setup Python
uses: actions/setup-python@v4
with:
python-version: '3.8'
- name: Build native lib
run: ./gradlew buildNativeProject
env:
PM_PYTHON_EXT: python3
- name: Upload MacOS native lib artifacts
uses: actions/upload-artifact@v4
with:
name: macos-native-libs
path: |
*/src/main/resources/de/fabmax/physxjni/macos/*.dylib
*/src/main/resources/de/fabmax/physxjni/macos/*.dylib.sha1
*/src/main/resources/de/fabmax/physxjni/macosarm/*.dylib
*/src/main/resources/de/fabmax/physxjni/macosarm/*.dylib.sha1
compression-level: 0
publish:
name: Build and publish Java and Android libs
runs-on: ubuntu-latest
needs: [ linux, macos, windows ]
environment: publish
steps:
- name: Checkout project
uses: actions/checkout@v3
with:
lfs: true
submodules: true
- name: Set up JDK
uses: actions/setup-java@v3
with:
distribution: 'temurin'
java-version: '17'
- name: Download native lib artifacts
uses: actions/download-artifact@v4
- name: Copy downloaded artifacts to resources
run: |
cp -r linux-native-libs/* .
cp -r macos-native-libs/* .
cp -r windows-native-libs/* .
- name: Build Android bindings
run: ./gradlew :physx-jni-android:buildNativeProjectAndroid
- name: Build JNI bindings
run: ./gradlew build
- name: Publish JNI bindings
run: ./gradlew publish
env:
MAVEN_USERNAME: ${{ secrets.MAVEN_USERNAME }}
MAVEN_PASSWORD: ${{ secrets.MAVEN_PASSWORD }}
GPG_PRIVATE_KEY: ${{ secrets.GPG_PRIVATE_KEY }}
GPG_PASSWORD: ${{ secrets.GPG_PASSWORD }}
- name: Create release
uses: ncipollo/release-action@v1
with:
allowUpdates: true
artifacts: >-
physx-jni/build/libs/*.jar,
physx-jni-natives-linux/build/libs/physx-jni-natives-linux-?.?.?.jar,
physx-jni-natives-linux-cuda/build/libs/physx-jni-natives-linux-cuda-?.?.?.jar,
physx-jni-natives-windows/build/libs/physx-jni-natives-windows-?.?.?.jar,
physx-jni-natives-windows-cuda/build/libs/physx-jni-natives-windows-cuda-?.?.?.jar,
physx-jni-natives-macos/build/libs/physx-jni-natives-macos-?.?.?.jar,
physx-jni-natives-macos-arm64/build/libs/physx-jni-natives-macos-arm64-?.?.?.jar,
physx-jni-android/build/outputs/aar/physx-jni-android-release.aar
draft: true
updateOnlyUnreleased: true