fix: Fix compilation issue #154
Workflow file for this run
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@v3 | |
- name: Validate Gradle Wrapper | |
uses: gradle/wrapper-validation-action@v1 | |
- name: Set up JDK 17 | |
uses: actions/setup-java@v3 | |
with: | |
java-version: 17 | |
distribution: "temurin" | |
cache: "gradle" | |
- name: Build Artifact | |
run: ./gradlew build | |
- 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=$(./gradlew :imperium-mindustry:getArtifactPath -q)" >> $GITHUB_ENV | |
echo "DISCORD_ARTIFACT_PATH=$(./gradlew :imperium-discord:getArtifactPath -q)" >> $GITHUB_ENV | |
- name: Upload Mindustry Artifact to Actions | |
uses: actions/upload-artifact@v3 | |
with: | |
name: "${{ github.event.repository.name }}" | |
path: "${{ env.MINDUSTRY_ARTIFACT_PATH }}" | |
- name: Upload Discord Artifact to Actions | |
uses: actions/upload-artifact@v3 | |
with: | |
name: "${{ github.event.repository.name }}" | |
path: "${{ env.DISCORD_ARTIFACT_PATH }}" |