name: Nightly Release on: workflow_dispatch: inputs: branch: description: Branch required: true default: main push: branches: - main permissions: contents: write concurrency: group: nightly cancel-in-progress: true jobs: build: if: > !gitea.event.head_commit || !contains(gitea.event.head_commit.message, '[skip ci]') runs-on: ubuntu-24.04 steps: - name: Checkout uses: actions/checkout@v4 with: fetch-depth: 1 ref: ${{ gitea.event_name == 'workflow_dispatch' && inputs.branch || gitea.ref_name }} submodules: recursive - name: Install dependencies run: | sudo dpkg --add-architecture i386 wget https://apt.llvm.org/llvm.sh chmod +x llvm.sh sudo ./llvm.sh 21 sudo apt-get update -qq sudo apt-get install -y wine sudo apt-get install -y --no-install-recommends \ cmake ninja-build rsync zip util-linux \ clang-21 lld-21 llvm-21 clang-tools-21 jq - name: Install xwin (Binary) run: | curl -L https://github.com/Jake-Shadle/xwin/releases/download/0.8.0/xwin-0.8.0-x86_64-unknown-linux-musl.tar.gz | tar xz sudo mv xwin-*/xwin /usr/bin/ xwin --version - name: Create Tool Symlinks run: | sudo ln -sf /usr/bin/clang-cl-21 /usr/bin/clang-cl sudo ln -sf /usr/bin/llvm-ml-21 /usr/bin/llvm-ml sudo ln -sf /usr/bin/lld-link-21 /usr/bin/lld-link sudo ln -sf /usr/bin/clang-21 /usr/bin/clang sudo ln -sf /usr/bin/llvm-rc-21 /usr/bin/llvm-rc sudo ln -sf /usr/bin/llvm-lib-21 /usr/bin/llvm-lib sudo ln -sf /usr/bin/llvm-mt-21 /usr/bin/llvm-mt clang-cl --version - name: Setup .NET uses: actions/setup-dotnet@v4 with: dotnet-version: '10.0.x' - name: Build run: | export INSTALL_PREFIX=$PWD/result ./build-linux.sh . Release - name: Package artifacts run: | mkdir -p staging cd result/client zip -r ../../staging/neoLegacyWindows64.zip . cd ../.. cd result/server zip -r ../../staging/neoLegacyServerWindows64.zip . cd ../.. cd result/fourkit zip -r ../../staging/neoLegacyServerWindows64-FourKit.zip . cd ../.. - name: Upload build artifacts uses: christopherhx/gitea-upload-artifact@v4 with: name: build-windows64 path: staging/* release: needs: build if: > !gitea.event.head_commit || !contains(gitea.event.head_commit.message, '[skip ci]') runs-on: ubuntu-24.04 steps: - name: Download build artifacts uses: christopherhx/gitea-download-artifact@v4 with: name: build-windows64 path: artifacts - name: Fetch SHA id: vars run: echo "short_sha=${GITHUB_SHA::7}" >> "$GITHUB_OUTPUT" - name: Publish nightly client release uses: akkuman/gitea-release-action@v1 with: name: "Client: ${{ steps.vars.outputs.short_sha }}" direction: upload server_url: ${{ gitea.server_url }} repository: ${{ gitea.repository }} token: ${{ gitea.token }} tag_name: Nightly prerelease: true # override: true verbose: true files: artifacts/neoLegacyWindows64.zip body: | # Instructions: **Newcomers:** - If this is your first time, download `neoLegacyWindows64.zip` and extract it wherever you would like to keep it. - I would recommend to set your username prior to launch (create a file called `username.txt`, put your desired username into the file, and save). - To play, simply run `Minecraft.Client.exe`. **Steam Deck & Linux:** - Y'all know the drill. Download the `neoLegacyWindows64.zip`, extract it, add the `Minecraft.Client.exe` as a "Non-Steam Game" within the Steam library, turn on compatibility mode with Proton Experimental, and then run it! # Multiplayer instructions: LAN games are natively supported, and any LAN games will appear automatically on the right. However, if you'd like to play with your friends online (and if you don't want to require them to setup a vpn, and/or if you don't want to port forward), I would recommend the following setup. Please keep in mind, you do NOT need to do this to enjoy the game. This is just how I have it setup for me so my friends can join without any hassle: Prerequisites: - Premium playit.gg account, costs about $3 USD per month. This is for setting up the tunnel. - playit.gg agent installed on host PC. How-to: - Ensure your playit.gg agent is connected to your playit.gg account - On the playit.gg website, setup a new tunnel (choose TCP). Ensure the configurable settings are set to the below values, assuming your agent is installed on the same computer as your online neoLegacyMinecraft game is hosted from. - Configurable settings: - Local IP: `127.0.0.1` - Local Port: `25565` - Proxy Protocol: `None` - After creating your tunnel, navigate to the "Tunnels" main page. You'll see the IP address and port for your tunnel. This is what your friends will input when adding your server in order to join your online game! - name: Publish nightly server release uses: akkuman/gitea-release-action@v1 with: name: "Server: ${{ steps.vars.outputs.short_sha }}" direction: upload server_url: ${{ gitea.server_url }} repository: ${{ gitea.repository }} token: ${{ gitea.token }} tag_name: Nightly-Server prerelease: true # override: true verbose: true files: artifacts/neoLegacyServerWindows64*.zip body: | Dedicated Server runtime for Windows64. Two flavours are attached: - \`neoLegacyServerWindows64.zip\`: vanilla server, no plugin support, smallest download. - \`neoLegacyServerWindows64-FourKit.zip\`: server with the FourKit plugin host, bundled .NET 10 runtime, and an empty \`plugins/\` folder ready for plugin authors to drop DLLs into. Pick the flavour you want and extract it to a folder where you'd like to keep the server runtime. cleanup: needs: [build, release] if: always() runs-on: ubuntu-24.04 steps: - name: Install jq run: sudo apt-get update && sudo apt-get install -y jq - name: Delete build artifacts env: FORGE_TOKEN: ${{ gitea.token }} REPO: ${{ gitea.repository }} API: ${{ gitea.server_url }}/api/v1 run: | AUTH="Authorization: token $FORGE_TOKEN" ARTIFACTS=$(curl -s -H "$AUTH" \ "$API/repos/$REPO/actions/artifacts?name=build-windows64") for ARTIFACT_ID in $(echo "$ARTIFACTS" | jq -r '.artifacts[].id // empty'); do curl -s -X DELETE -H "$AUTH" \ "$API/repos/$REPO/actions/artifacts/$ARTIFACT_ID" done