-
-
Notifications
You must be signed in to change notification settings - Fork 2
94 lines (93 loc) · 3.48 KB
/
snapshot.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
93
94
{
"jobs": {
"build": {
"runs-on": "ubuntu-22.04",
"steps": [
{
"name": "Setup Java",
"run": "echo \"JAVA_HOME=$JAVA_HOME_21_X64\" >> \"$GITHUB_ENV\""
},
{
"with": {
"fetch-depth": "0",
"persist-credentials": "false"
},
"name": "Checkout",
"uses": "actions/checkout@v4"
},
{
"name": "Validate Gradle Wrapper",
"uses": "gradle/actions/wrapper-validation@v3"
},
{
"with": {
"path": "**/.gradle/loom-cache\n**/.gradle/quilt-loom-cache",
"key": "${{ runner.os }}-gradle-${{ hashFiles('**/libs.versions.*', '**/*.gradle*', '**/gradle-wrapper.properties') }}",
"restore-keys": "${{ runner.os }}-gradle-"
},
"name": "Cache",
"uses": "actions/cache/restore@v4"
},
{
"with": {
"cache-read-only": true,
"gradle-home-cache-cleanup": true
},
"name": "Setup Gradle",
"uses": "gradle/actions/setup-gradle@v3"
},
{
"name": "Assemble",
"run": "./gradlew assemble",
"id": "assemble",
"env": {
"SNAPSHOT_MAVEN_PASSWORD": "${{ secrets.SNAPSHOT_MAVEN_PASSWORD }}",
"SNAPSHOT_MAVEN_USER": "github",
"SNAPSHOT_MAVEN_URL": "https://maven.lukebemish.dev/snapshots/"
}
},
{
"name": "Test",
"run": "./gradlew check --continue",
"id": "test",
"env": {
"SNAPSHOT_MAVEN_PASSWORD": "${{ secrets.SNAPSHOT_MAVEN_PASSWORD }}",
"SNAPSHOT_MAVEN_USER": "github",
"SNAPSHOT_MAVEN_URL": "https://maven.lukebemish.dev/snapshots/"
}
},
{
"with": {
"name": "junit-test-results",
"path": "*/runs/gametest/results/junit.xml",
"retention-days": "1"
},
"name": "Upload junit-test-results",
"uses": "actions/upload-artifact@v4",
"if": "(success() || failure()) && steps.assemble.outcome == 'success'"
},
{
"name": "Publish",
"run": "./gradlew publish",
"id": "publish",
"env": {
"SNAPSHOT_MAVEN_PASSWORD": "${{ secrets.SNAPSHOT_MAVEN_PASSWORD }}",
"SNAPSHOT_MAVEN_USER": "github",
"SNAPSHOT_MAVEN_URL": "https://maven.lukebemish.dev/snapshots/"
}
}
]
}
},
"name": "Snapshot",
"concurrency": "ci-${{ github.ref }}",
"on": {
"workflow_dispatch": {
},
"push": {
"branches": [
"1.*"
]
}
}
}