Skip to content

Commit

Permalink
Adjust workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
shartte committed Dec 9, 2024
1 parent 63276a0 commit 9f06ca5
Showing 1 changed file with 33 additions and 5 deletions.
38 changes: 33 additions & 5 deletions .github/workflows/build-prs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,36 @@ jobs:
- 1.19.2
- 1.20.1
- 1.21.1
uses: neoforged/actions/.github/workflows/build-prs.yml@main
with:
java: 21
gradle_tasks: makeModuleMetadata -PminecraftVersion=${{ matrix.version }}
jar_compatibility: false

runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 1000
fetch-tags: true

# Switch to a new branch with the PR number and PR branch name,
# for the projects where the buildscript uses the branch name
- name: Create branch for commit
run:
git switch -C pr-${{ github.event.pull_request.number }}-${{ github.event.pull_request.head.ref }}

- name: Setup Java ${{ inputs.java }}
uses: neoforged/actions/setup-java@main
with:
java-version: 21

- name: Setup Gradle
uses: gradle/actions/setup-gradle@v4
with:
cache-read-only: false

- name: Build with Gradle
run: ./gradlew publish -PminecraftVersion=${{ matrix.version }}

- name: Store repository
uses: actions/upload-artifact@v4
with:
name: repo-${{ matrix.version }}
path: repo

0 comments on commit 9f06ca5

Please sign in to comment.