-
-
Notifications
You must be signed in to change notification settings - Fork 56
74 lines (66 loc) · 2.04 KB
/
1.20.3_pr.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
name: Build PR snapshot (1.19)
on:
pull_request:
paths:
- '**.gradle'
- '**.properties'
- '**/src/**'
branches:
- "1.20.4"
types: [ opened, synchronize, reopened ]
jobs:
validate-gradle:
name: "Validate Gradle wrapper"
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0
- uses: gradle/wrapper-validation-action@v1
license:
name: "Verify License integrity"
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
- name: Set up JDK 17
uses: actions/setup-java@v2
with:
java-version: 17
distribution: 'temurin'
- name: Setup Gradle and verify license using Licenser
uses: gradle/gradle-build-action@v2
with:
arguments: licenseCheck
build:
name: "Build"
runs-on: ubuntu-20.04
if: |
!contains(github.event.pull_request.title, '[ci skip]')
steps:
- uses: actions/checkout@v2
- name: Set up JDK 17
uses: actions/setup-java@v2
with:
java-version: 17
distribution: 'temurin'
- name: Setup and Build with Gradle
uses: gradle/gradle-build-action@v2
with:
arguments: build --stacktrace --no-daemon
- name: Setting mod version
run: |
cat $GITHUB_WORKSPACE/gradle.properties | grep ^archives_base_name= >> $GITHUB_ENV
cat $GITHUB_WORKSPACE/gradle.properties | grep ^minecraft_version= >> $GITHUB_ENV
cat $GITHUB_WORKSPACE/gradle.properties | grep ^base_version= >> $GITHUB_ENV
- name: Create package name
run: echo "package_name=[$minecraft_version] $archives_base_name-$base_version-SNAPSHOT.PR${{ github.event.number }}" >> $GITHUB_ENV
- uses: actions/upload-artifact@v2
with:
name: ${{ env.package_name }}
path: |
**/build/libs/
!build/libs/
!**/*-dev.jar
!**/*-shadow.jar
!**/*-transformProduction*.jar
!**/testmod*/