-
Notifications
You must be signed in to change notification settings - Fork 23
40 lines (37 loc) · 1.29 KB
/
build.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
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@v1
with:
java-version: 17
- name: Grant execute permission for gradlew
run: chmod +x gradlew
- name: Use gradle cache for faster builds
uses: actions/cache@v1
with:
path: ~/.gradle/caches
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle') }}
- name: Validate AW
run: ./gradlew validateAccessWidener
- 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