-
Notifications
You must be signed in to change notification settings - Fork 31
45 lines (39 loc) · 1.31 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
41
42
43
44
45
# This workflow will build a Java project with Gradle
# For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-gradle
name: Build And Publish to Modrinth
on : [push, pull_request]
env:
MINECRAFT_VERSION: 1.20.1
VERSION: 1.20.1-snapshot
MODRINTH_TOKEN: ${{ secrets.PUBLISH_MODRINTH_TOKEN }}
RELEASE_NAME: banner-1.20.1
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Cache
uses: actions/cache@v2
with:
path: |
~/.gradle/caches
~/.gradle/wrapper
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }}
restore-keys: |
${{ runner.os }}-gradle-
- uses: actions/checkout@v4
- name: Set up JDK 17
uses: actions/setup-java@v3
with:
java-version: '17'
distribution: 'adopt'
- name: Set version env
run: echo "RELEASE_VERSION=${GITHUB_REF:10}" >> $GITHUB_ENV
- name: Grant execute permission for gradlew
run: chmod +x gradlew
- name: Build with Gradle
run: ./gradlew cleaBuild build
- name: Upload API Lib
uses: actions/upload-artifact@v4
with:
name: Banner API
path: ./banner-api/build/devlibs/*.jar