Skip to content

Avoid resending scoreboard packets #702

Avoid resending scoreboard packets

Avoid resending scoreboard packets #702

Workflow file for this run

name: Build
on:
push:
branches: [ "**" ]
tags-ignore: [ "**" ]
pull_request:
release:
types: [ published ]
jobs:
build:
if: "${{ github.event_name != 'pull_request' || github.repository != github.event.pull_request.head.repo.full_name }}"
runs-on: ubuntu-latest
strategy:
matrix:
java: [ 21 ]
fail-fast: true
steps:
- uses: actions/checkout@v4
- name: JDK ${{ matrix.java }}
uses: actions/setup-java@v4
with:
java-version: ${{ matrix.java }}
distribution: 'temurin'
- name: Validate Gradle wrapper
uses: gradle/wrapper-validation-action@v2
- name: Setup gradle
uses: gradle/actions/setup-gradle@v3
- name: Setup gradle cache
uses: actions/cache@v4
env:
cache-name: project-gradle-cache
with:
path: |
.gradle/caches/VanillaGradle
.gradle/loom-cache
**/.gradle/caches/paperweight
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/libs.versions.toml', '**/*.gradle*', '**/gradle-wrapper.properties') }}
restore-keys: |
${{ runner.os }}-build-${{ env.cache-name }}-
- name: Execute gradle build
run: ./gradlew build
- name: Determine status
run: ./gradlew printVersionStatus --quiet >> $GITHUB_ENV
- name: Publish release to modrinth
if: "${{ env.STATUS == 'release' && github.event_name == 'release' }}"
run: ./gradlew modrinth
env:
MODRINTH_TOKEN: "${{ secrets.MODRINTH_TOKEN }}"
RELEASE_NOTES: "${{ github.event.release.body }}"
- name: Publish release to hangar
if: "${{ env.STATUS == 'release' && github.event_name == 'release' }}"
run: ./gradlew publishAllPublicationsToHangar
env:
HANGAR_TOKEN: "${{ secrets.HANGAR_TOKEN }}"
RELEASE_NOTES: "${{ github.event.release.body }}"