test 3 #258
This file contains 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
# This workflow will build a Java project with Gradle and cache/restore any dependencies to improve the workflow execution time | |
# For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-gradle | |
name: Java CI with Gradle | |
on: | |
push: | |
paths-ignore: | |
- '.github/**' | |
- '**.md' | |
- '.gitignore' | |
- 'LICENSE' | |
pull_request: | |
paths-ignore: | |
- '.github/**' | |
- '**.md' | |
- '.gitignore' | |
- 'LICENSE' | |
jobs: | |
build-combined: | |
runs-on: ubuntu-latest | |
permissions: | |
contents: read | |
if: | |
contains('refs/heads/main', github.ref) | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up JDK 21 | |
uses: actions/setup-java@v4 | |
with: | |
java-version: '21' | |
distribution: 'temurin' | |
- name: Grant execute permission for gradlew for Fabric | |
working-directory: ./Fabric | |
run: chmod +x gradlew | |
- name: Grant execute permission for gradlew for NeoForge | |
working-directory: ./NeoForge | |
run: chmod +x gradlew | |
# Configure Gradle for optimal use in GitHub Actions, including caching of downloaded dependencies. | |
# See: https://github.com/gradle/actions/blob/main/setup-gradle/README.md | |
- name: Setup Gradle | |
uses: gradle/actions/setup-gradle@af1da67850ed9a4cedd57bfd976089dd991e2582 # v4.0.0 | |
- name: Build Fabric with Gradle | |
working-directory: ./Fabric | |
run: ./gradlew build | |
- name: Publish artifacts | |
uses: actions/upload-artifact@v4 | |
with: | |
name: Package-Fabric | |
path: ./Fabric/build/libs | |
- name: Build NeoForge with Gradle | |
working-directory: ./NeoForge | |
run: ./gradlew build | |
- name: Publish artifacts | |
uses: actions/upload-artifact@v4 | |
with: | |
name: Package-NeoForge | |
path: ./NeoForge/build/libs | |
build-forge-20: | |
runs-on: ubuntu-latest | |
permissions: | |
contents: read | |
if: | |
contains('refs/heads/1.20.6-Forge', github.ref) | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up JDK 21 | |
uses: actions/setup-java@v4 | |
with: | |
java-version: '21' | |
distribution: 'temurin' | |
- name: Grant execute permission for gradlew | |
run: chmod +x gradlew | |
- name: Build with Gradle | |
run: ./gradlew build | |
- name: Publish artifacts | |
uses: actions/upload-artifact@v4 | |
with: | |
name: Package-Forge | |
path: build/libs |