update engine version #75
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Build and Package | |
| on: | |
| push: | |
| pull_request: | |
| release: | |
| types: [created] | |
| workflow_dispatch: | |
| jobs: | |
| build-jar: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v3 | |
| - name: Set up JDK 21 | |
| uses: actions/setup-java@v3 | |
| with: | |
| java-version: '21' | |
| distribution: 'temurin' | |
| cache: gradle | |
| - name: Build with Gradle | |
| run: ./gradlew build | |
| - name: Upload Fat JAR | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: artifacts-portable | |
| path: dist/portable/*-portable.jar | |
| retention-days: 7 | |
| build-web: | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: read | |
| packages: write | |
| id-token: write | |
| pages: write | |
| steps: | |
| - uses: actions/checkout@v3 | |
| - name: Set up JDK 21 | |
| uses: actions/setup-java@v3 | |
| with: | |
| java-version: '21' | |
| distribution: 'temurin' | |
| cache: gradle | |
| - name: Build Web Application | |
| run: ./gradlew buildBundledWebApp | |
| - name: Upload pages artifact | |
| uses: actions/upload-pages-artifact@v3 | |
| with: | |
| path: 'dist/web-bundle' | |
| - name: Deploy to GitHub Pages | |
| if: github.event_name == 'release' | |
| id: deployment | |
| uses: actions/deploy-pages@v4 | |
| build-native: | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| os: [ubuntu-latest, windows-latest, macos-latest] | |
| include: | |
| - os: ubuntu-latest | |
| platform: linux | |
| - os: windows-latest | |
| platform: windows | |
| - os: macos-latest | |
| platform: macos | |
| steps: | |
| - uses: actions/checkout@v3 | |
| - name: Set up GraalVM | |
| uses: graalvm/setup-graalvm@v1 | |
| with: | |
| java-version: '21' | |
| distribution: 'graalvm' | |
| github-token: ${{ secrets.GITHUB_TOKEN }} | |
| native-image-job-reports: 'true' | |
| - name: Build Native Executable for ${{ matrix.platform }} | |
| shell: bash | |
| run: | | |
| ./gradlew buildNativeExecutable | |
| ls -R dist | |
| - name: Prepare artifacts for ${{ matrix.platform }} | |
| shell: bash | |
| run: | | |
| if [[ "${{ matrix.platform }}" == "windows" ]]; then | |
| choco install -y zip | |
| fi | |
| echo "Listing build artifacts for ${{ matrix.platform }}" | |
| ls -R dist | |
| mkdir -p dist/artifacts | |
| artifactsDir="$PWD/dist/artifacts/" | |
| cd dist | |
| for platformDir in *.buildNative *.setup; do | |
| if [ -d "$platformDir" ]; then | |
| platform=${platformDir%.*} | |
| cd "$platformDir" | |
| if [[ "${{ matrix.platform }}" == "macos" ]]; then | |
| ditto -c -k --sequesterRsrc --keepParent . "$artifactsDir/$platform.zip" | |
| else | |
| zip -r "$artifactsDir/$platform.zip" * | |
| fi | |
| cd .. | |
| fi | |
| done | |
| ls -R | |
| - name: Upload Artifacts for ${{ matrix.platform }} | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: artifacts-${{ matrix.platform }} | |
| path: dist/artifacts/* | |
| retention-days: 7 | |
| publish-release: | |
| needs: [build-jar, build-native] | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Download all artifacts | |
| uses: actions/download-artifact@v4 | |
| with: | |
| path: artifacts | |
| - name: Rename and prepare artifacts | |
| run: | | |
| mkdir -p release | |
| ls -R artifacts | |
| releaseDir="$PWD/release" | |
| for artifactDir in artifacts/artifacts-*; do | |
| baseDir="$PWD" | |
| cd "$artifactDir" | |
| for artifact in *; do | |
| cp "$artifact" "$releaseDir/" | |
| done | |
| cd "$baseDir" | |
| done | |
| - name: Upload release artifact to github actions | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: release | |
| path: release/* | |
| retention-days: 60 | |
| - name: Upload Release to GitHub | |
| if: github.event_name == 'release' | |
| uses: softprops/action-gh-release@v1 | |
| with: | |
| files: release/* | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |