[O] More stable implmentation #19
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 & Release JAR and EXE | |
| on: | |
| push: | |
| tags: | |
| - 'v*.*.*' # runs only on tags starting with v | |
| permissions: write-all | |
| jobs: | |
| build_and_release: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Check out code | |
| uses: actions/checkout@v3 | |
| - name: Setup Bun | |
| uses: oven-sh/setup-bun@v2 | |
| with: | |
| bun-version: latest | |
| - name: Build frontend | |
| run: | | |
| cd rooms | |
| bun install | |
| bun run build | |
| cp -r dist ../src/main/resources/ | |
| rm -rf dist | |
| VITE_WL_BUILD_PROD=true bun run build | |
| - name: Upload pages build | |
| uses: actions/upload-pages-artifact@v3 | |
| with: | |
| path: rooms/dist | |
| - name: Setup .NET 8.x | |
| uses: actions/setup-dotnet@v4 | |
| with: | |
| dotnet-version: '8.x' | |
| - uses: actions/checkout@v4 | |
| with: | |
| repository: 'MewoLab/AquaMai-Build-Assets' | |
| path: "AquaMai-Build-Assets" | |
| token: ${{ secrets.PATGH }} | |
| - name: Copy Libs | |
| run: cp AquaMai-Build-Assets/WorldLinkLibs/* mod/Libs/ | |
| - name: Build .NET Mod | |
| run: cd mod && dotnet build -c Release | |
| - name: Set up JDK 21 | |
| uses: actions/setup-java@v3 | |
| with: | |
| distribution: temurin | |
| java-version: '21' | |
| - name: Grant Gradle permissions | |
| run: chmod +x gradlew | |
| - name: Build fat JAR | |
| run: ./gradlew clean buildFatJar | |
| - name: Release | |
| uses: softprops/action-gh-release@v2 | |
| with: | |
| tag_name: ${{ github.ref_name }} | |
| name: "Release ${{ github.ref_name }}" | |
| body: "CI Build Release" | |
| draft: false | |
| prerelease: false | |
| files: | | |
| build/libs/worldlinkd.jar | |
| mod/bin/Release/net472/WorldLink.dll | |
| mod/WorldLink.toml | |
| token: ${{ secrets.GITHUB_TOKEN }} | |
| # Deploy job | |
| deploy: | |
| # Add a dependency to the build job | |
| needs: build_and_release | |
| # Grant GITHUB_TOKEN the permissions required to make a Pages deployment | |
| permissions: | |
| pages: write # to deploy to Pages | |
| id-token: write # to verify the deployment originates from an appropriate source | |
| # Deploy to the github-pages environment | |
| environment: | |
| name: github-pages | |
| url: ${{ steps.deployment.outputs.page_url }} | |
| # Specify runner + deployment step | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Deploy to GitHub Pages | |
| id: deployment | |
| uses: actions/deploy-pages@v4 # or specific "vX.X.X" version tag for this action |