Initial port to 26.1.2 #505
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 | |
| on: [ workflow_dispatch, pull_request, push ] | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout Repository | |
| uses: actions/checkout@v4 | |
| - name: Extract Versions | |
| id: versions | |
| run: | | |
| echo "java=$(grep -oP '(?<=java = )".*"' gradle/libs.versions.toml | cut -d '"' -f2)" >> "$GITHUB_OUTPUT" | |
| - name: Setup Java | |
| uses: actions/setup-java@v4 | |
| with: | |
| distribution: temurin | |
| java-version: ${{ steps.versions.outputs.java }} | |
| cache: gradle | |
| - name: Loom Cache | |
| uses: actions/cache@v4 | |
| with: | |
| path: "**/.gradle/loom-cache" | |
| key: "${{ runner.os }}-gradle-${{ hashFiles('**/libs.versions.*', '**/*.gradle*', '**/gradle-wrapper.properties') }}" | |
| restore-keys: "${{ runner.os }}-gradle-" | |
| - name: Setup Gradle | |
| uses: gradle/actions/setup-gradle@v4 | |
| with: | |
| gradle-home-cache-cleanup: true | |
| cache-read-only: ${{ !endsWith(github.ref_name, '/dev') }} | |
| - name: Build | |
| # Doesn't actually publish, as no secrets are passed in, just makes sure that publishing works | |
| run: ./gradlew publish --no-daemon | |
| - name: Capture Build Artifacts | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: Artifacts | |
| path: | | |
| common/build/libs/ | |
| fabric/build/libs/ | |
| neoforge/build/libs/ | |
| vanillin/common/build/libs/ | |
| vanillin/fabric/build/libs/ | |
| vanillin/neoforge/build/libs/ |