Skip to content

Commit

Permalink
Add Action
Browse files Browse the repository at this point in the history
  • Loading branch information
Gaming32 committed Jan 22, 2024
1 parent 02ed1a0 commit 3cf99bd
Showing 1 changed file with 36 additions and 0 deletions.
36 changes: 36 additions & 0 deletions .github/workflows/gradle.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: Gradle build
on: [push, pull_request, workflow_dispatch]

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Get cache key
id: cache_key
run: echo "gradle_key=gradle-`cat versions/mainProject`" >> $GITHUB_OUTPUT
- name: Cache Gradle stuff
uses: actions/cache@v3
with:
key: ${{ steps.cache_key.outputs.gradle_key }}-${{ hashFiles('*.gradle.kts', 'gradle.properties', '*/*.gradle.kts', 'gradle/**') }}
restore-keys: ${{ steps.cache_key.outputs.gradle_key }}-
path: |
~/.gradle/caches
~/.gradle/wrapper
.gradle/loom-cache
- name: Set up JDK 17
uses: actions/setup-java@v1
with:
java-version: 17
- name: Build with Gradle
run: ./gradlew build --stacktrace
- name: Upload Fabric artifacts
uses: actions/upload-artifact@v2
with:
name: Artifact
path: fabric/build/libs
- name: Upload NeoForge artifacts
uses: actions/upload-artifact@v2
with:
name: Artifact
path: neoforge/build/libs

0 comments on commit 3cf99bd

Please sign in to comment.