diff --git a/.github/workflows/linux.yml b/.github/workflows/linux.yml deleted file mode 100644 index e611240..0000000 --- a/.github/workflows/linux.yml +++ /dev/null @@ -1,41 +0,0 @@ -name: Linux - -on: - push: - branches: [ master ] - -jobs: - build: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v2 - - - name: Setup Gluon's GraalVM - uses: gluonhq/setup-graalvm@master - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - - - name: Install libraries - run: | - sudo apt update - sudo apt install libasound2-dev libavcodec-dev libavformat-dev libavutil-dev libgl-dev libgtk-3-dev libpango1.0-dev libxtst-dev - - - name: Make staging directory - run: mkdir staging - - #- name: Gluon License - # uses: gluonhq/gluon-build-license@v1 - # with: - # gluon-license: ${{ secrets.GLUON_LICENSE }} - - - name: Gluon Build - run: mvn gluonfx:build gluonfx:package - - - name: Copy native image to staging - run: cp -r target/gluonfx/x86_64-linux/* staging - - - name: Upload - uses: actions/upload-artifact@v2 - with: - name: Package - path: staging \ No newline at end of file diff --git a/.github/workflows/package.yml b/.github/workflows/package.yml new file mode 100644 index 0000000..af7c42b --- /dev/null +++ b/.github/workflows/package.yml @@ -0,0 +1,65 @@ +name: Package + +on: + push: + branches: [ master ] + +jobs: + package: + strategy: + matrix: + include: + - name: Windows + os: windows-latest + profile: desktop + path: x86_64-windows + exe: j3.exe + - name: Linux + os: ubuntu-latest + profile: desktop + path: x86_64-linux + exe: j3 + runs-on: ${{ matrix.os }} + steps: + - uses: actions/checkout@v2 + + - name: Add msbuild to PATH (Windows) + if: runner.os == 'Windows' + uses: microsoft/setup-msbuild@v1.0.2 + + - name: Visual Studio shell (Windows) + if: runner.os == 'Windows' + uses: egor-tensin/vs-shell@v1 + + - name: Install dependencies (Linux) + if: runner.os == 'Linux' + run: | + sudo apt update + sudo apt install libasound2-dev libavcodec-dev libavformat-dev libavutil-dev libgl-dev libgtk-3-dev libpango1.0-dev libxtst-dev + + - name: Setup Gluon's GraalVM + uses: gluonhq/setup-graalvm@master + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + + #- name: Gluon License + # uses: gluonhq/gluon-build-license@v1 + # with: + # gluon-license: ${{ secrets.GLUON_LICENSE }} + + - name: Gluon Build and Package + run: mvn -P${{ matrix.profile }} gluonfx:build gluonfx:package + + - name: Create distribution + run: | + mkdir staging + mkdir staging/J3 + cp target/gluonfx/${{ matrix.path }}/${{ matrix.exe }} staging/J3 + cp -r data/ staging/J3/data + cp -r animations staging/J3/animations + + - name: Upload + uses: actions/upload-artifact@v4 + with: + name: J3-${{ matrix.name }} + path: staging diff --git a/.github/workflows/windows.yml b/.github/workflows/windows.yml deleted file mode 100644 index 26fb8d4..0000000 --- a/.github/workflows/windows.yml +++ /dev/null @@ -1,44 +0,0 @@ -name: Windows - -on: - push: - branches: [ master ] - -jobs: - build: - runs-on: windows-latest - steps: - - uses: actions/checkout@v2 - - - name: Add msbuild to PATH - uses: microsoft/setup-msbuild@v1.0.2 - - - name: Visual Studio shell - uses: egor-tensin/vs-shell@v1 - - - name: Setup Gluon's GraalVM - uses: gluonhq/setup-graalvm@master - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - - - name: Make staging directory - run: mkdir staging - - #- name: Gluon License - # uses: gluonhq/gluon-build-license@v1 - # with: - # gluon-license: ${{ secrets.GLUON_LICENSE }} - - - name: Gluon Build and Package - run: mvn gluonfx:build gluonfx:package - - - name: Copy native bundles to staging - run: | - cp target/gluonfx/x86_64-windows/j3.exe staging - cp target/gluonfx/x86_64-windows/j3-*.msi staging - - - name: Upload - uses: actions/upload-artifact@v2 - with: - name: Package - path: staging