Skip to content
This repository has been archived by the owner on Jul 16, 2024. It is now read-only.

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
TexBlock committed Nov 26, 2023
1 parent 95166a5 commit 3dfd735
Showing 1 changed file with 25 additions and 9 deletions.
34 changes: 25 additions & 9 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -1,24 +1,40 @@
name: Java CI with Gradle
name: Build

on: [ pull_request, push ]
on: [ pull_request, push, workflow_dispatch ]

jobs:
build:
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: Grant execute permission for Gradlew
run: chmod +x gradlew
- 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: ./gradlew build
- name: Upload build artifacts
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
path: build/libs
name: Artifacts-forge
path: ${{ github.workspace }}/forge/build/libs

0 comments on commit 3dfd735

Please sign in to comment.