This repository has been archived by the owner on Jul 16, 2024. It is now read-only.
Update build.yml #43
Workflow file for this run
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
name: Build | |
on: [ pull_request, push, workflow_dispatch ] | |
jobs: | |
Build: | |
runs-on: ubuntu-22.04 | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Get github short hash | |
id: github_short_hash | |
run: echo "result=$(git rev-parse --short "${{ github.sha }}")" >> $GITHUB_OUTPUT | |
- name: Set up JDK 17 | |
uses: actions/setup-java@v3 | |
with: | |
distribution: 'temurin' | |
java-version: 17 | |
- name: Cache | |
uses: actions/cache@v3 | |
with: | |
path: | | |
~/.gradle/caches | |
~/.gradle/wrapper | |
.gradle | |
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties', 'build.gradle') }} | |
- name: Build with Gradle | |
run: | | |
chmod +x gradlew | |
./gradlew build | |
- name: Upload artifacts (fabric) | |
uses: actions/upload-artifact@v3 | |
with: | |
name: Artifacts-fabric | |
path: ${{ github.workspace }}/fabric/build/libs | |
- name: Upload artifacts (forge) | |
uses: actions/upload-artifact@v3 | |
with: | |
name: Artifacts-forge | |
path: ${{ github.workspace }}/forge/build/libs |