-
-
Notifications
You must be signed in to change notification settings - Fork 0
54 lines (48 loc) · 1.26 KB
/
build_only.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
name: Build
on:
push:
paths:
- '**.gradle'
- '**.gradle.kts'
- '**.properties'
- '**/src/**'
branches-ignore:
- "1.**"
- "main"
- "master"
workflow_dispatch:
permissions:
contents: write
actions: write
jobs:
build:
name: "Build"
runs-on: ubuntu-latest
if: |
!contains(github.event.head_commit.message, '[ci skip]')
steps:
- uses: actions/checkout@v4
- name: Set up JDK 22
uses: actions/setup-java@v4
with:
java-version: 22
distribution: "temurin"
- name: Setup Gradle
uses: gradle/actions/setup-gradle@v4
- name: Build
run: ./gradlew check build
- name: Setting mod version
run: |
cat $GITHUB_WORKSPACE/gradle.properties | grep ^archives_base_name= >> $GITHUB_ENV
cat $GITHUB_WORKSPACE/gradle.properties | grep ^mod_version= >> $GITHUB_ENV
- uses: actions/upload-artifact@v4
with:
name: "${{ env.archives_base_name }}-${{ env.mod_version }}"
path: |
build/**/**/libs/
!build/*/libs/
!build/libs/
!**/*-dev.jar
!**/*-shadow.jar
!**/*-transformProduction*.jar
!**/testmod*/