Skip to content

[O] Disable Nagle's Algorithm #16

[O] Disable Nagle's Algorithm

[O] Disable Nagle's Algorithm #16

Workflow file for this run

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 .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
# Or if you are using Shadow plugin:
# run: ./gradlew clean shadowJar
# Example jpackage step:
- name: Build Windows .exe with jpackage
# jpackage is available by default in the Java 17 distribution on Ubuntu,
# but note you need to specify --type exe on Windows. On Ubuntu, you can cross-compile
# for Windows using the --win-* flags only if you have the right cross-toolchain set up.
# Typically, you'd run this step on Windows if you want an actual .exe.
# For demonstration, here's how you'd do it on a Windows runner:
if: runner.os == 'Windows'
run: |
jpackage \
--type exe \
--name "WorldLinkD" \
--input .\build\libs \
--main-jar "worldlinkd.jar" \
--main-class "aquadx.ApplicationKt" \
--java-options "-Xmx512m" \
--win-console
- 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 }}
- name: Upload EXE to Release
if: runner.os == 'Windows'
uses: actions/upload-release-asset@v1
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: "WorldLinkD-1.0.exe" # adjust if different output file
asset_name: "WorldLinkD-installer.exe" # or any naming convention you want
asset_content_type: application/octet-stream