Bump actions/download-artifact from 5 to 6 #90
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: | |
| push: | |
| paths: | |
| - '*.gradle' | |
| - 'gradle.properties' | |
| - 'src/**' | |
| - 'versions/**' | |
| - '.github/**' | |
| pull_request: | |
| workflow_dispatch: | |
| inputs: | |
| release: | |
| type: boolean | |
| description: 'Set to true to build a release version' | |
| default: false | |
| required: false | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: checkout repository | |
| uses: actions/checkout@v5 | |
| - name: Set up JDK 21 | |
| uses: actions/setup-java@v5 | |
| with: | |
| distribution: 'temurin' | |
| java-version: 21 | |
| - name: Setup Gradle | |
| uses: gradle/actions/setup-gradle@v4 | |
| with: | |
| cache-read-only: ${{ github.ref != 'refs/heads/main' && github.ref != 'refs/heads/master' && github.ref != 'refs/heads/dev' }} | |
| - name: Build with gradle | |
| run: | | |
| chmod +x gradlew | |
| echo "Building all subprojects" | |
| ./gradlew build | |
| env: | |
| BUILD_ID: ${{ github.run_number }} | |
| BUILD_RELEASE: ${{ inputs.release }} | |
| - name: Collect mod jars | |
| run: | | |
| shopt -s extglob | |
| mkdir mod-jars | |
| for jar in versions/*/build/libs/!(*-@(dev|sources|shadow)).jar; do | |
| cp -p "$jar" mod-jars/ | |
| done | |
| ls -l mod-jars | |
| - name: Upload mod jars | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: mod-jars | |
| path: mod-jars/*.jar | |
| summary: | |
| runs-on: ubuntu-latest | |
| needs: | |
| - build | |
| steps: | |
| - uses: actions/checkout@v5 | |
| - uses: actions/setup-python@v5 | |
| with: | |
| python-version: 3.12 | |
| - name: Download build artifacts | |
| uses: actions/download-artifact@v6 | |
| with: | |
| name: mod-jars | |
| path: mod-jars | |
| - name: Make build summary | |
| run: python .github/workflows/scripts/summary.py |