fall in puddle hurt interration 1 #42
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 Release Windows Executable | |
| on: | |
| push: | |
| tags: | |
| - 'v*' | |
| - '[0-9]+.[0-9]+.[0-9]+' | |
| workflow_dispatch: | |
| inputs: | |
| tag_name: | |
| description: 'Tag name for manual release' | |
| required: false | |
| permissions: | |
| contents: write | |
| jobs: | |
| build-windows: | |
| runs-on: windows-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Set up JDK 21 | |
| uses: actions/setup-java@v4 | |
| with: | |
| distribution: 'temurin' | |
| java-version: '21' | |
| - name: Setup Gradle | |
| uses: gradle/actions/setup-gradle@v3 | |
| - name: Build JARs with Gradle | |
| run: gradle build -x test --no-daemon | |
| - name: Build Launcher Installer | |
| run: | | |
| # Create installer directory structure | |
| New-Item -ItemType Directory -Force -Path installer-staging | |
| New-Item -ItemType Directory -Force -Path build\distributions | |
| # Copy launcher JAR and icon | |
| Copy-Item launcher\build\libs\woodlanders-launcher.jar -Destination installer-staging\ | |
| if (Test-Path assets\icon\icon.png) { | |
| Copy-Item assets\icon\icon.png -Destination installer-staging\launcher.ico | |
| } | |
| # Create installer script from template | |
| $scriptContent = Get-Content -Path .github\scripts\windows-installer-template.ps1 -Raw | |
| $scriptContent = $scriptContent -replace '\$\{VERSION\}', '${{ github.ref_name }}' | |
| $scriptContent = $scriptContent -replace '\$scriptDir = if \(\$PSScriptRoot\) \{ \$PSScriptRoot \} else \{ Split-Path -Parent \$MyInvocation\.MyCommand\.Path \}', '$scriptDir = if ($PSScriptRoot) { $PSScriptRoot } elseif ($MyInvocation.MyCommand.Path) { Split-Path -Parent $MyInvocation.MyCommand.Path } else { Get-Location | Select-Object -ExpandProperty Path }' | |
| $scriptContent | Out-File -FilePath installer-staging\install.ps1 -Encoding UTF8 | |
| # Create README | |
| $readmeLines = @( | |
| "# Woodlanders Launcher Installer", | |
| "", | |
| "## Installation Instructions", | |
| "", | |
| "IMPORTANT: Extract the entire ZIP file before running the installer.", | |
| "The installer needs all files in the same folder to work correctly.", | |
| "", | |
| "### Option 1: Run the EXE (Recommended)", | |
| "1. Extract the ZIP file", | |
| "2. Double-click woodlanders-setup-launcher.exe", | |
| "3. Follow the prompts", | |
| "", | |
| "### Option 2: Run PowerShell Script", | |
| "1. Extract the ZIP file", | |
| "2. Right-click install.ps1", | |
| "3. Select Run with PowerShell", | |
| "", | |
| "## What Gets Installed", | |
| "", | |
| "- Woodlanders Launcher application", | |
| "- Java 21 with JavaFX (if not already installed)", | |
| "- Desktop shortcut with icon", | |
| "- Start Menu entry with icon", | |
| "", | |
| "## Installation Location", | |
| "", | |
| "%LOCALAPPDATA%\Woodlanders\Launcher", | |
| "", | |
| "## Features", | |
| "", | |
| "- Auto-updates game from GitHub releases", | |
| "- Multi-language support (EN, PL, PT, NL, DE)", | |
| "- Offline mode support", | |
| "- No manual Java installation required", | |
| "", | |
| "## Uninstallation", | |
| "", | |
| "To uninstall:", | |
| "1. Delete: %LOCALAPPDATA%\Woodlanders\Launcher", | |
| "2. Delete desktop shortcut", | |
| "3. Delete: %APPDATA%\Microsoft\Windows\Start Menu\Programs\Woodlanders", | |
| "", | |
| "## Troubleshooting", | |
| "", | |
| "If the installer fails:", | |
| "- Ensure all files from the ZIP are in the same folder", | |
| "- Check internet connection for first-time setup", | |
| "- Check Windows Defender is not blocking the installer", | |
| "- Run the installer as Administrator", | |
| "", | |
| "For help: https://github.com/gcclinux/Woodlanders" | |
| ) | |
| $readmeLines -join "`r`n" | Out-File -FilePath installer-staging\README.txt -Encoding UTF8 | |
| # Install ps2exe and convert to EXE | |
| Install-Module -Name ps2exe -Force -Scope CurrentUser -AllowClobber | |
| Import-Module ps2exe | |
| Invoke-ps2exe ` | |
| -inputFile installer-staging\install.ps1 ` | |
| -outputFile build\distributions\woodlanders-setup-launcher.exe ` | |
| -title "Woodlanders Launcher Installer" ` | |
| -description "Woodlanders Game Launcher Installer" ` | |
| -company "Wagemaker UK" ` | |
| -version "1.0.0.0" ` | |
| -requireAdmin ` | |
| -noConsole:$false | |
| # Create distribution package | |
| Copy-Item installer-staging\woodlanders-launcher.jar -Destination build\distributions\ -Force | |
| Copy-Item installer-staging\launcher.ico -Destination build\distributions\ -Force -ErrorAction SilentlyContinue | |
| Copy-Item installer-staging\install.ps1 -Destination build\distributions\ -Force | |
| Copy-Item installer-staging\README.txt -Destination build\distributions\ -Force | |
| # Create ZIP with all installer files | |
| $zipFiles = @( | |
| "build\distributions\woodlanders-setup-launcher.exe", | |
| "build\distributions\woodlanders-launcher.jar", | |
| "build\distributions\launcher.ico", | |
| "build\distributions\install.ps1", | |
| "build\distributions\README.txt" | |
| ) | |
| $zipFiles = $zipFiles | Where-Object { Test-Path $_ } | |
| Compress-Archive -Path $zipFiles -DestinationPath build\distributions\woodlanders-launcher-installer.zip -Force | |
| Write-Host "Launcher installer created successfully" | |
| - name: Create jpackage directory | |
| run: mkdir jpackage-input | |
| - name: Copy JAR to jpackage input | |
| run: | | |
| if (Test-Path build\libs\woodlanders-client.jar) { | |
| Write-Host "Found woodlanders-client.jar" | |
| Copy-Item build\libs\woodlanders-client.jar -Destination jpackage-input\woodlanders.jar | |
| } else { | |
| Write-Error "woodlanders-client.jar not found in build/libs" | |
| Write-Host "Available files:" | |
| Get-ChildItem -Path build\libs | |
| exit 1 | |
| } | |
| - name: Verify JAR exists | |
| run: | | |
| if (Test-Path jpackage-input\woodlanders.jar) { | |
| Write-Host "JAR file found successfully" | |
| Get-Item jpackage-input\woodlanders.jar | |
| } else { | |
| Write-Error "JAR file not found!" | |
| exit 1 | |
| } | |
| - name: Create portable Windows executable with jpackage | |
| run: | | |
| jpackage ` | |
| --input jpackage-input ` | |
| --name Woodlanders ` | |
| --main-jar woodlanders.jar ` | |
| --type app-image ` | |
| --dest dist ` | |
| --app-version 1.0.0 ` | |
| --vendor "Wagemaker UK" ` | |
| --description "Woodlanders Game" ` | |
| --win-console | |
| - name: Create portable ZIP package | |
| run: | | |
| cd dist | |
| Compress-Archive -Path Woodlanders -DestinationPath Woodlanders-Windows-Portable.zip | |
| - name: Get tag name | |
| id: get_tag | |
| shell: bash | |
| run: | | |
| if [ "${{ github.event_name }}" = "push" ] && [[ "${{ github.ref }}" == refs/tags/* ]]; then | |
| TAG_NAME=${GITHUB_REF#refs/tags/} | |
| echo "tag_name=$TAG_NAME" >> $GITHUB_OUTPUT | |
| echo "is_tag=true" >> $GITHUB_OUTPUT | |
| echo "Detected tag: $TAG_NAME" | |
| elif [ -n "${{ github.event.inputs.tag_name }}" ]; then | |
| echo "tag_name=${{ github.event.inputs.tag_name }}" >> $GITHUB_OUTPUT | |
| echo "is_tag=true" >> $GITHUB_OUTPUT | |
| echo "Manual tag: ${{ github.event.inputs.tag_name }}" | |
| else | |
| echo "is_tag=false" >> $GITHUB_OUTPUT | |
| echo "No tag detected" | |
| fi | |
| - name: Create GitHub Release | |
| if: steps.get_tag.outputs.is_tag == 'true' | |
| uses: softprops/action-gh-release@v1 | |
| with: | |
| tag_name: ${{ steps.get_tag.outputs.tag_name }} | |
| name: Release ${{ steps.get_tag.outputs.tag_name }} | |
| draft: false | |
| prerelease: false | |
| body: | | |
| ## Downloads | |
| - **Woodlanders-Windows-Portable.zip** - Windows executable with bundled JRE (no Java installation required) | |
| - **Woodlanders-Linux-x86_64.AppImage** - Linux executable with bundled JRE (no Java installation required) | |
| - **woodlanders-launcher-installer.zip** - Launcher installer with auto Java/JavaFX setup (recommended for new users) | |
| - **woodlanders-launcher.jar** - Standalone launcher JAR (requires Java 21+) | |
| - **woodlanders-client.jar** - Client JAR (requires Java 21+) | |
| - **woodlanders-server.jar** - Dedicated server JAR (requires Java 21+) | |
| ## Launcher Installer | |
| The launcher installer (`woodlanders-launcher-installer.zip`) provides: | |
| - Automatic Java 21 + JavaFX installation (if needed) | |
| - Desktop and Start Menu shortcuts | |
| - Multi-language support (English, Polish, Portuguese, Dutch, German) | |
| - Auto-updates game from GitHub releases | |
| - Version management and offline mode | |
| **Installation:** Extract the ZIP and run `woodlanders-setup-launcher.exe` | |
| ## Server Requirements by Player Count | |
| | Players | CPU Cores | RAM | Upload Speed | | |
| |---------|-----------|-----|--------------| | |
| | 5-10 | 2 | 1GB | 2 Mbps | | |
| | 10-20 | 2-4 | 2GB | 5 Mbps | | |
| | 20-50 | 4 | 4GB | 10 Mbps | | |
| | 50+ | 8+ | 8GB | 20 Mbps | | |
| ## Configuration Quick Reference | |
| ### server.properties | |
| ```properties | |
| # Server port (default: 25565) | |
| server.port=25565 | |
| # Maximum concurrent clients (default: 20) | |
| server.max-clients=20 | |
| # World seed - 0 for random (default: 0) | |
| world.seed=0 | |
| # Heartbeat interval in seconds (default: 5) | |
| server.heartbeat-interval=5 | |
| # Client timeout in seconds (default: 15) | |
| server.client-timeout=15 | |
| # Message rate limit per client (default: 100) | |
| server.rate-limit=100 | |
| # Enable debug logging (default: false) | |
| server.debug=false | |
| ``` | |
| ## Server Launch Commands | |
| ```bash | |
| # Basic start | |
| java -jar woodlanders-server.jar | |
| # Basic & config | |
| java -jar woodlanders-server.jar --config server.properties | |
| # With memory allocation | |
| java -Xms2G -Xmx2G -jar woodlanders-server.jar | |
| # With memory & config | |
| java -Xms2G -Xmx2G -jar woodlanders-server.jar --config server.properties | |
| # With custom port | |
| java -jar woodlanders-server.jar --port 7777 | |
| # With all options | |
| java -Xms4G -Xmx4G -XX:+UseG1GC -jar woodlanders-server.jar --port 25565 --max-clients 50 | |
| ``` | |
| files: | | |
| ./dist/Woodlanders-Windows-Portable.zip | |
| ./build/distributions/woodlanders-launcher-installer.zip | |
| ./build/libs/woodlanders-client.jar | |
| ./build/libs/woodlanders-server.jar | |
| ./build/libs/woodlanders-launcher.jar | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Upload artifacts as backup | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: Woodlanders-Release-Artifacts | |
| path: | | |
| dist/Woodlanders-Windows-Portable.zip | |
| build/libs/woodlanders-client.jar | |
| build/libs/woodlanders-server.jar | |
| build/libs/woodlanders-launcher.jar | |
| retention-days: 90 |