fix(mindustry): Fix autopause remaining active after world reload #1422
This file contains 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 | |
on: | |
push: | |
branches: [ "**" ] | |
tags-ignore: [ "**" ] | |
pull_request: | |
concurrency: | |
group: "${{ github.workflow }}-${{ github.event.number || github.ref }}" | |
cancel-in-progress: true | |
jobs: | |
build: | |
# Only run on PRs if the source branch is on someone else's repo | |
if: "${{ github.event_name != 'pull_request' || github.repository != github.event.pull_request.head.repo.full_name }}" | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout Repository | |
uses: actions/checkout@v4 | |
with: | |
fetch-tags: true | |
fetch-depth: 0 | |
- name: Set up JDK 17 | |
uses: actions/setup-java@v4 | |
with: | |
java-version: 17 | |
distribution: "temurin" | |
- name: Setup Gradle | |
uses: gradle/actions/setup-gradle@v4 | |
- name: Build Artifact | |
run: gradle build -x spotlessCheck | |
- name: Upload Test Summary | |
uses: EnricoMi/publish-unit-test-result-action@v2 | |
if : always() | |
with: | |
check_name: "test results" | |
junit_files: "**/build/test-results/test/TEST-*.xml" | |
- name: Set up Artifacts Upload | |
run: | | |
echo "MINDUSTRY_ARTIFACT_PATH=$(gradle :imperium-mindustry:getArtifactPath -q)" >> $GITHUB_ENV | |
echo "DISCORD_ARTIFACT_PATH=$(gradle :imperium-discord:getArtifactPath -q)" >> $GITHUB_ENV | |
- name: Upload Mindustry artifact to Actions | |
uses: actions/upload-artifact@v4 | |
with: | |
name: imperium-mindustry | |
path: "${{ env.MINDUSTRY_ARTIFACT_PATH }}" | |
if-no-files-found: error | |
- name: Upload Discord artifacts to Actions | |
uses: actions/upload-artifact@v4 | |
with: | |
name: imperium-discord | |
path: "${{ env.DISCORD_ARTIFACT_PATH }}" | |
if-no-files-found: error | |
- name: Format Code | |
if: ${{ github.event_name != 'pull_request' }} | |
run: gradle spotlessApply | |
- name: Commit Formatted Code | |
if: ${{ github.event_name != 'pull_request' }} | |
uses: stefanzweifel/git-auto-commit-action@v5 | |
with: | |
commit_message: "style: Format code" |