Skip to content

workflow only configures its own build now #9

workflow only configures its own build now

workflow only configures its own build now #9

Workflow file for this run

name: Gradle CI (new)
on:
push:
paths-ignore:
- 'README.md'
- 'LICENSE'
- '.gitignore'
- '.editorconfig'
- 'changelog.md'
- 'mod-comparison.md'
pull_request:
jobs:
retrieve-targets:
runs-on: ubuntu-latest
name: Retrieve targets
outputs:
targets: ${{ steps.get-targets.outputs.targets }}
steps:
- uses: actions/checkout@v4
- name: Get potential versions
id: get-targets
run: |
TARGETS=$(ls -d versions/*/ | xargs -n 1 basename | jq -Rc [inputs])
echo "targets=$TARGETS" >> $GITHUB_OUTPUT
build:
needs: retrieve-targets
runs-on: ubuntu-latest
name: Build with gradle
# Folders in versions folder may not be registered in gradle,
# which will make this build fail. This is why we ignore errors.
continue-on-error: true
strategy:
matrix:
target: ${{ fromJson(needs.retrieve-targets.outputs.targets) }}
steps:
- uses: actions/checkout@v4
- name: Set up JDK
uses: actions/setup-java@v4
with:
java-version: 21
distribution: temurin
- name: Grant execute permission for gradlew
run: chmod +x gradlew
- name: Switch sources to version ${{ matrix.target }}
run: ./gradlew buildAndCollectActive --stacktrace
env:
CI_SINGLE_BUILD: ${{ matrix.target }}
- uses: actions/upload-artifact@v4
with:
path: build/finalJars/*.jar
name: ${{ matrix.target }}