-
Notifications
You must be signed in to change notification settings - Fork 1
92 lines (80 loc) · 2.36 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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
name: Build
on:
push:
branches-ignore:
- l10n_master
workflow_dispatch:
inputs:
deploy_all:
description: 'Deploy All'
required: true
default: false
type: boolean
deploy_curseforge:
description: 'Deploy CurseForge'
required: true
default: false
type: boolean
deploy_modrinth:
description: 'Deploy Modrinth'
required: true
default: false
type: boolean
deploy_nightbloom:
description: 'Deploy NightBloom'
required: true
default: false
type: boolean
env:
CF_APIKEY: ${{ secrets.CF_APIKEY }}
MODRINTH_TOKEN: ${{ secrets.MODRINTH_TOKEN }}
NIGHTBLOOM_TOKEN: ${{ secrets.NIGHTBLOOM_TOKEN }}
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: update cache
uses: actions/cache@v4
with:
path: |
~/.gradle/caches
~/.gradle/wrapper
key: ${{ runner.os }}-gradle-${{ hashFiles('gradle/wrapper/gradle-wrapper.properties') }}
restore-keys: |
${{ runner.os }}-gradle-
- name: Set up Gradle JDK
uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: '21'
- name: Grant execute permission for gradlew
run: chmod +x gradlew
- name: Build with Gradle
run: ./gradlew --build-cache --info --stacktrace build
- name: Deploy to CurseForge
if: |
inputs.deploy_all || inputs.deploy_curseforge
run: ./gradlew --build-cache --info --stacktrace publishCurseforge
- name: Deploy to Modrinth
if: |
inputs.deploy_all || inputs.deploy_modrinth
run: ./gradlew --build-cache --info --stacktrace publishModrinth
- name: Deploy to NightBloom
if: |
inputs.deploy_all || inputs.deploy_nightbloom
run: ./gradlew --build-cache --info --stacktrace publishNightbloom
- uses: actions/upload-artifact@v4
with:
name: artifacts
path: |
**/build/libs/
!common/build/libs/
!buildSrc/build/libs/
!build/libs/
!**/*-dev.jar
!**/*-shadow.jar
!**/*-transformProduction*.jar
!**/testmod*/
- name: stop daemon
run: ./gradlew --stop