Add heartbeat nudge on player join/leave events #5
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 | |
| on: | |
| push: | |
| branches: | |
| - main | |
| permissions: | |
| contents: write | |
| jobs: | |
| build-and-release: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Set up Java | |
| uses: actions/setup-java@v4 | |
| with: | |
| distribution: temurin | |
| java-version: "25" | |
| cache: gradle | |
| - name: Compute version/tag | |
| id: ver | |
| shell: bash | |
| run: | | |
| VERSION="$(date -u +%Y.%m.%d.%H%M)" | |
| echo "version=$VERSION" >> "$GITHUB_OUTPUT" | |
| echo "tag=v$VERSION" >> "$GITHUB_OUTPUT" | |
| - name: Build (shaded jar) | |
| shell: bash | |
| env: | |
| VERSION_OVERRIDE: ${{ steps.ver.outputs.version }} | |
| run: | | |
| chmod +x ./gradlew | |
| ./gradlew build -x test | |
| - name: Locate shaded jar | |
| id: jar | |
| shell: bash | |
| run: | | |
| JAR="$(ls -1 build/libs/*-shaded.jar | head -n 1)" | |
| if [ -z "$JAR" ]; then | |
| echo "No shaded jar found in build/libs" | |
| ls -la build/libs || true | |
| exit 1 | |
| fi | |
| OUT="build/libs/HytlDevServerPlugin.jar" | |
| cp "$JAR" "$OUT" | |
| echo "path=$OUT" >> "$GITHUB_OUTPUT" | |
| - name: Create GitHub Release | |
| uses: softprops/action-gh-release@v2 | |
| with: | |
| tag_name: ${{ steps.ver.outputs.tag }} | |
| name: Release ${{ steps.ver.outputs.tag }} | |
| generate_release_notes: true | |
| files: | | |
| ${{ steps.jar.outputs.path }} | |