Repository navigation
Bring basePower to Minecraft 1.13.2 #19
Workflow file for this run
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: CodeQL | |
| on: | |
| push: | |
| branches: [master-1.13.2, 'feature/**'] | |
| pull_request: | |
| branches: [master-1.13.2] | |
| schedule: | |
| - cron: '47 7 * * 4' | |
| permissions: | |
| actions: read | |
| contents: read | |
| security-events: write | |
| jobs: | |
| analyze: | |
| name: Analyze Java | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 75 | |
| steps: | |
| - name: Check out PowerAdvantage | |
| uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7 | |
| - name: Check out pinned OreSpawn | |
| uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7 | |
| with: | |
| repository: MinecraftModDevelopmentMods/OreSpawn | |
| ref: 6a7c2bb07b9a7771128812fcc07d185f7d9df58b | |
| path: .ci-dependencies/OreSpawn | |
| - name: Use canonical LF dependency inputs | |
| # Base Metals predates archive text normalization; its LF artifact is separately pinned. | |
| run: git config --global core.autocrlf false | |
| - name: Read Base Metals development pin | |
| id: basemetals-pin | |
| shell: bash | |
| run: | | |
| set -euo pipefail | |
| ref=$(sed -n 's/^basemetals_source_commit=//p' gradle.properties) | |
| [[ "$ref" =~ ^[a-f0-9]{40}$ ]] | |
| echo "ref=$ref" >> "$GITHUB_OUTPUT" | |
| - name: Check out pinned Base Metals | |
| uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7 | |
| with: | |
| repository: MinecraftModDevelopmentMods/BaseMetals | |
| ref: ${{ steps.basemetals-pin.outputs.ref }} | |
| path: .ci-dependencies/BaseMetals | |
| - name: Install Java 25 for Mavenizer | |
| uses: actions/setup-java@b6effb05e454b25005698d916606bdc6ffcbf961 # v5 | |
| with: | |
| distribution: temurin | |
| java-version: '25.0.3+9.0.LTS' | |
| - name: Install Java 8 toolchain | |
| uses: actions/setup-java@b6effb05e454b25005698d916606bdc6ffcbf961 # v5 | |
| with: | |
| distribution: temurin | |
| java-version: '8.0.502+7' | |
| - name: Install Java 17 for Gradle | |
| uses: actions/setup-java@b6effb05e454b25005698d916606bdc6ffcbf961 # v5 | |
| with: | |
| distribution: microsoft | |
| java-version: '17' | |
| - name: Set up Gradle | |
| uses: gradle/actions/setup-gradle@9c971963bec38e04b3d30dcc455b5382be2fdbfb # v6 | |
| - name: Build pinned development dependencies | |
| id: dependencies | |
| shell: bash | |
| run: | | |
| set -euo pipefail | |
| orespawn="$GITHUB_WORKSPACE/.ci-dependencies/OreSpawn" | |
| basemetals="$GITHUB_WORKSPACE/.ci-dependencies/BaseMetals" | |
| chmod +x "$orespawn/gradlew" "$basemetals/gradlew" | |
| (cd "$orespawn" && ./gradlew jar --no-daemon --stacktrace) | |
| mirror="$RUNNER_TEMP/orespawn-mirror" | |
| (cd "$basemetals" && bash gradle/stage-orespawn-release.sh "$mirror" && | |
| ./gradlew jar "-PorespawnVerificationRepository=$mirror" --no-daemon --stacktrace) | |
| bm_version=$(sed -n 's/^basemetals_version=//p' gradle.properties) | |
| echo "orespawn=$orespawn/build/libs-dev/OreSpawn-4.1.0.113021-deobf.jar" >> "$GITHUB_OUTPUT" | |
| echo "basemetals=$basemetals/build/libs-dev/BaseMetals-$bm_version-deobf.jar" >> "$GITHUB_OUTPUT" | |
| - name: Initialize CodeQL | |
| uses: github/codeql-action/init@db488ddef3bf6cb639b32c2e9a7c0a7ea8271d28 # v4 | |
| with: | |
| languages: java-kotlin | |
| - name: Compile production code | |
| run: | | |
| chmod +x ./gradlew | |
| ./gradlew clean classes --rerun-tasks --no-build-cache --no-daemon --stacktrace \ | |
| -PbaseMetalsDeobfJar=${{ steps.dependencies.outputs.basemetals }} \ | |
| -PoreSpawnDeobfJar=${{ steps.dependencies.outputs.orespawn }} | |
| - name: Analyze | |
| uses: github/codeql-action/analyze@db488ddef3bf6cb639b32c2e9a7c0a7ea8271d28 # v4 |