Skip to content

Enable Gradle Caching + Parallel #56

Enable Gradle Caching + Parallel

Enable Gradle Caching + Parallel #56

Workflow file for this run

name: Build on push
on: [push, pull_request]
jobs:
build:
runs-on: ubuntu-latest
steps:
- id: var
name: Setup variables
run: echo ::set-output name=commit_hash::${GITHUB_SHA:0:7}
- uses: actions/checkout@v2
- name: Set up JDK 17
uses: actions/setup-java@v3
with:
distribution: 'microsoft'
java-version: '17'
- name: Setup Gradle
uses: gradle/gradle-build-action@v2
with:
cache-read-only: ${{ github.ref != 'refs/heads/main' }}
- name: Build with Gradle
run: ./gradlew build
env:
POWAH_VERSION: vgit-${{ steps.var.outputs.commit_hash }}
- name: Upload artifacts
uses: actions/upload-artifact@v2
with:
name: powah ${{ steps.var.outputs.commit_hash }} [FABRIC]
path: fabric/build/libs/Powah-git-${{ steps.var.outputs.commit_hash }}.jar
- name: Upload artifacts
uses: actions/upload-artifact@v2
with:
name: powah ${{ steps.var.outputs.commit_hash }} [NEOFORGE]
path: neoforge/build/libs/Powah-git-${{ steps.var.outputs.commit_hash }}.jar