|
1 | | -# This Action will build the SDK and if this succeeds, create a github release |
| 1 | +# This Action will build the SDK and if this succeeds, create a GitHub release |
2 | 2 | name: Release Builds |
3 | 3 | on: |
4 | 4 | push: |
5 | 5 | tags: |
6 | 6 | - "*" |
7 | 7 | jobs: |
| 8 | + |
| 9 | + # ------------------------------- |
| 10 | + # 1. Build + bundle (Linux only) |
| 11 | + # ------------------------------- |
8 | 12 | build: |
9 | 13 | runs-on: ubuntu-latest |
10 | 14 | steps: |
11 | | - - uses: actions/checkout@v2 |
12 | | - - name: Set up JDK 21 |
13 | | - uses: actions/setup-java@v3 |
14 | | - with: |
15 | | - distribution: temurin |
16 | | - java-version: 21 |
17 | | - - name: Install wine |
18 | | - run: sudo dpkg --add-architecture i386 && sudo apt-get update && sudo apt install -y xorg xvfb xfonts-100dpi xfonts-75dpi xfonts-scalable xfonts-cyrillic wine32:i386 wine makepkg |
19 | | - - name: Grant execute permission for gradle |
20 | | - run: chmod +x gradlew |
21 | 15 | - name: Build the SDK |
22 | | - run: ./gradlew buildSdk -Ptag_name=${{ github.ref_name }} |
23 | | - - name: Override Harness (custom icon) |
24 | | - run: ./gradlew overrideHarness -Ptag_name=${{ github.ref_name }} |
25 | | - - name: Build Installers |
26 | | - run: ant -Dstorepass="$NBM_SIGN_PASS" -Dpack200.enabled=false set-spec-version build-zip unset-spec-version |
27 | | - - name: Download JDKs for the installers |
28 | | - run: bash download-jdks.sh |
29 | | - working-directory: installers |
30 | | - - name: Build the installers |
31 | | - run: bash build-installers.sh ${{ github.ref_name }} headless |
32 | | - working-directory: installers |
33 | | - - name: Create Release |
34 | | - uses: softprops/action-gh-release@v1 |
| 16 | + uses: ./.github/actions/build-sdk |
| 17 | + with: |
| 18 | + tag: ${{ github.ref_name }} |
| 19 | + createBundle: true |
35 | 20 |
|
| 21 | + - name: Prepare installers |
| 22 | + uses: ./.github/actions/prepare-installers |
| 23 | + |
| 24 | + - name: Upload bundle |
| 25 | + uses: actions/upload-artifact@v7 |
36 | 26 | with: |
37 | | - files: | |
38 | | - dist/jmonkeyplatform*.* |
39 | | - dist/jmonkeyengine-sdk*.* |
40 | | - dist/jMonkeyEngine-SDK*.* |
41 | | - tag_name: ${{ github.ref }} |
42 | | - name: Release ${{ github.ref }} |
43 | | - env: |
44 | | - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
| 27 | + name: bundle |
| 28 | + path: dist/jmonkeyplatform.zip |
| 29 | + compression-level: 0 |
| 30 | + if-no-files-found: error |
| 31 | + |
| 32 | + - name: Upload installers |
| 33 | + uses: actions/upload-artifact@v7 |
| 34 | + with: |
| 35 | + name: installer-input |
| 36 | + path: | |
| 37 | + installers/ |
| 38 | + nbpackage/ |
| 39 | + compression-level: 9 |
| 40 | + |
| 41 | + # ------------------------------- |
| 42 | + # 2. Native installer packaging (matrix) |
| 43 | + # ------------------------------- |
| 44 | + package: |
| 45 | + needs: build |
| 46 | + |
| 47 | + strategy: |
| 48 | + matrix: |
| 49 | + os: [ ubuntu-latest, ubuntu-24.04-arm, windows-latest, macos-latest, macos-26-intel ] |
| 50 | + |
| 51 | + runs-on: ${{ matrix.os }} |
| 52 | + |
| 53 | + steps: |
| 54 | + - name: Download bundle |
| 55 | + uses: actions/download-artifact@v8 |
| 56 | + |
| 57 | + - name: Build installers |
| 58 | + uses: ./.github/actions/build-installers |
| 59 | + with: |
| 60 | + tag: ${{ github.ref_name }} |
| 61 | + os: ${{ runner.os }} |
| 62 | + arch: ${{ runner.arch }} |
| 63 | + |
| 64 | + - name: Upload installers |
| 65 | + uses: actions/upload-artifact@v7 |
| 66 | + with: |
| 67 | + name: installers-${{ matrix.os }} |
| 68 | + path: dist/installers/** |
| 69 | + |
| 70 | + # ------------------------------- |
| 71 | + # 3. Release |
| 72 | + # ------------------------------- |
| 73 | + release: |
| 74 | + needs: package |
| 75 | + runs-on: ubuntu-latest |
| 76 | + |
| 77 | + steps: |
| 78 | + - name: Publish release |
| 79 | + uses: ./.github/actions/publish-release |
| 80 | + with: |
| 81 | + tag: ${{ github.ref }} |
| 82 | +# - name: Download JDKs for the installers |
| 83 | +# run: bash download-jdks.sh |
| 84 | +# working-directory: installers |
| 85 | +# - name: Build the installers |
| 86 | +# run: bash build-installers.sh ${{ github.ref_name }} headless |
| 87 | +# working-directory: installers |
| 88 | +# - name: Create Release |
| 89 | +# uses: softprops/action-gh-release@v1 |
| 90 | +# |
| 91 | +# with: |
| 92 | +# files: | |
| 93 | +# dist/jmonkeyplatform*.* |
| 94 | +# dist/jmonkeyengine-sdk*.* |
| 95 | +# dist/jMonkeyEngine-SDK*.* |
| 96 | +# tag_name: ${{ github.ref }} |
| 97 | +# name: Release ${{ github.ref }} |
| 98 | +# env: |
| 99 | +# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
0 commit comments