forked from KubeJS-Mods/KubeJS
-
Notifications
You must be signed in to change notification settings - Fork 0
69 lines (61 loc) · 1.82 KB
/
build_1605.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
name: Java CI (1.16.5)
on:
push:
branches:
- 'main'
workflow_dispatch:
inputs:
release_type:
description: 'Release Type'
required: true
type: choice
default: 'release'
options:
- 'release'
- 'beta'
- 'alpha'
- 'none'
jobs:
build:
runs-on: ubuntu-latest
if: |
!contains(github.event.head_commit.message, '[ci skip]')
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 30
- name: Set up JDK 17
uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: '17'
cache: gradle
- name: Grant execute permission for gradlew
run: chmod +x gradlew
- name: Validate Gradle Wrapper
uses: gradle/wrapper-validation-action@v2
- name: Build and Publish with Gradle
uses: gradle/gradle-build-action@v3
env:
FTB_MAVEN_TOKEN: ${{ secrets.FTB_MAVEN_TOKEN }}
SAPS_TOKEN: ${{ secrets.SAPS_TOKEN }}
with:
arguments: build publish --stacktrace --no-daemon
- name: Upload Build Artifact
uses: actions/upload-artifact@v4
with:
path: |
forge/build/libs
fabric/build/libs
- name: Release to CurseForge
uses: gradle/gradle-build-action@v3
if: ${{ github.event_name == 'workflow_dispatch' && inputs.release_type != 'none' }}
env:
GIT_COMMIT: ${{ github.event.after }}
GIT_PREVIOUS_COMMIT: ${{ github.event.before }}
CURSEFORGE_KEY: ${{ secrets.CURSEFORGE_KEY }}
MODRINTH_TOKEN: ${{ secrets.MODRINTH_TOKEN }}
RELEASE_TYPE: ${{ inputs.release_type }}
with:
arguments: curseforge --stacktrace --no-daemon