Skip to content

Commit a840461

Browse files
committed
Merge branch 'indev-1.18.2' into 1.18.x
2 parents 0922b0d + 8b5270b commit a840461

File tree

50 files changed

+1145
-637
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

50 files changed

+1145
-637
lines changed

.github/workflows/build-info.yml

Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
2+
name: Build Information (Last Tag)
3+
on: workflow_dispatch
4+
5+
jobs:
6+
info:
7+
name: Info
8+
runs-on: ubuntu-20.04
9+
outputs:
10+
release_type: ${{steps.cf_release_type.outputs.value }}
11+
cf_project: ${{steps.cf_project.outputs.value }}
12+
mod_id: ${{steps.mod_id.outputs.value }}
13+
version: ${{steps.version.outputs.version }}
14+
15+
steps:
16+
- name: Checkout
17+
uses: actions/checkout@v2
18+
19+
- name: Unshallow
20+
run: git fetch --prune --unshallow
21+
22+
- name: Release Type
23+
id: cf_release_type
24+
uses: christian-draeger/[email protected]
25+
with:
26+
path: './gradle.properties'
27+
property: 'cf_release_type'
28+
29+
- name: Project ID
30+
id: cf_project
31+
uses: christian-draeger/[email protected]
32+
with:
33+
path: './gradle.properties'
34+
property: 'cf_project'
35+
36+
- name: Mod ID
37+
id: mod_id
38+
uses: christian-draeger/[email protected]
39+
with:
40+
path: './gradle.properties'
41+
property: 'mod_id'
42+
43+
- name: Find Current Tag
44+
id: current
45+
uses: jimschubert/query-tag-action@v1
46+
with:
47+
include: 'v*'
48+
exclude: '*-rc*'
49+
commit-ish: '@'
50+
skip-unshallow: 'true'
51+
52+
- name: Semver Version
53+
id: version
54+
run: |
55+
version=$(echo "${{steps.current.outputs.tag}}" | cut -dv -f2)
56+
echo "::set-output name=version::$version"
57+
58+
output:
59+
name: Output Info
60+
runs-on: ubuntu-20.04
61+
needs: [ info ]
62+
steps:
63+
- run: echo "${{needs.info.outputs.mod_id}} version ${{needs.info.outputs.version}}; releasing as ${{needs.info.outputs.release_type}}"

.github/workflows/ci-tests-nightly.yml

Lines changed: 29 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,11 @@
11
name: Gradle Tests and Nightly (CI)
22

33
on:
4+
workflow_dispatch:
45
push:
56
branches:
67
- '**'
8+
- '!indev-*'
79
tags-ignore:
810
- v*
911
paths-ignore:
@@ -16,33 +18,28 @@ jobs:
1618
runs-on: ubuntu-20.04
1719
outputs:
1820
release_type: ${{steps.cf_release_type.outputs.value }}
19-
mod_version: ${{steps.mod_version.outputs.value }}
2021
steps:
2122
- name: Checkout
22-
uses: actions/checkout@v2
23-
23+
uses: actions/checkout@v2.4.0
24+
2425
- name: Release Type
2526
id: cf_release_type
2627
uses: christian-draeger/[email protected]
2728
with:
2829
path: './gradle.properties'
2930
property: 'cf_release_type'
3031

31-
- name: Mod Version
32-
id: mod_version
33-
uses: christian-draeger/[email protected]
34-
with:
35-
path: './gradle.properties'
36-
property: 'mod_version'
37-
3832
tests:
3933
name: Gradle Tests
4034
runs-on: ubuntu-20.04
4135
needs: [ vars ]
4236
steps:
4337
- name: Checkout
44-
uses: actions/checkout@v2
38+
uses: actions/checkout@v2.4.0
4539

40+
- name: Unshallow and Get Tags
41+
run: git fetch --prune --unshallow --tags
42+
4643
- name: Set up JDK
4744
uses: actions/setup-java@v2
4845
with:
@@ -61,12 +58,23 @@ jobs:
6158
- name: Grant execute permission for gradlew
6259
run: chmod +x gradlew
6360

64-
- name: Test JAR with Gradle
65-
run: ./gradlew test
61+
- name: Create datagen assets
62+
continue-on-error: true
63+
run: ./gradlew runData
64+
65+
- name: Test JAR with GameTest Server
66+
run: ./gradlew runGameTestServer
6667
env:
6768
GITHUB_ACTOR: ${{ secrets.GITHUB_ACTOR }}
6869
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
6970

71+
- name: Upload build failure
72+
if: failure()
73+
uses: actions/upload-artifact@v3
74+
with:
75+
name: test-data
76+
path: run/gametest
77+
7078
nightly:
7179
name: Publish Nightly
7280
runs-on: ubuntu-20.04
@@ -75,6 +83,9 @@ jobs:
7583
- name: Checkout
7684
uses: actions/checkout@v2
7785

86+
- name: Unshallow and Get Tags
87+
run: git fetch --prune --unshallow --tags
88+
7889
- name: Set up JDK
7990
uses: actions/setup-java@v2
8091
with:
@@ -93,9 +104,12 @@ jobs:
93104
- name: Grant execute permission for gradlew
94105
run: chmod +x gradlew
95106

107+
- name: Generate Resources
108+
run: ./gradlew runData
109+
96110
- name: Publish gradle nightly jar
97-
run: ./gradlew publishNightlyMavenPublicationToGitHubPackagesRepository
111+
run: ./gradlew publishNightlyPublicationToGitHubPackagesRepository
98112
env:
99113
CM_RELEASE: false
100114
GITHUB_ACTOR: ${{ secrets.GITHUB_ACTOR }}
101-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
115+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

.github/workflows/manual-build.yml

Lines changed: 169 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,169 @@
1+
name: Manual Build and Changelog
2+
3+
on:
4+
workflow_dispatch:
5+
6+
jobs:
7+
vars:
8+
name: Gather Variables
9+
runs-on: ubuntu-20.04
10+
outputs:
11+
release_type: ${{steps.cf_release_type.outputs.value }}
12+
cf_project: ${{steps.cf_project.outputs.value }}
13+
mod_id: ${{steps.mod_id.outputs.value }}
14+
version: ${{steps.version.outputs.version }}
15+
16+
steps:
17+
- name: Checkout
18+
uses: actions/checkout@v2
19+
20+
- name: Unshallow
21+
run: git fetch --prune --unshallow
22+
23+
- name: Release Type
24+
id: cf_release_type
25+
uses: christian-draeger/[email protected]
26+
with:
27+
path: './gradle.properties'
28+
property: 'cf_release_type'
29+
30+
- name: Project ID
31+
id: cf_project
32+
uses: christian-draeger/[email protected]
33+
with:
34+
path: './gradle.properties'
35+
property: 'cf_project'
36+
37+
- name: Mod ID
38+
id: mod_id
39+
uses: christian-draeger/[email protected]
40+
with:
41+
path: './gradle.properties'
42+
property: 'mod_id'
43+
44+
- name: Find Current Tag
45+
id: current
46+
uses: jimschubert/query-tag-action@v1
47+
with:
48+
include: 'v*'
49+
exclude: '*-rc*'
50+
commit-ish: '@'
51+
skip-unshallow: 'true'
52+
53+
- name: Semver Version
54+
id: version
55+
run: |
56+
version=$(echo "${{steps.current.outputs.tag}}" | cut -dv -f2)
57+
echo "::set-output name=version::$version"
58+
59+
changelog:
60+
name: Generate Changelog (tags)
61+
runs-on: ubuntu-20.04
62+
steps:
63+
- name: Checkout
64+
uses: actions/checkout@v2
65+
66+
- name: Unshallow
67+
run: git fetch --prune --unshallow
68+
69+
- name: Find Current Tag
70+
id: current
71+
uses: jimschubert/query-tag-action@v1
72+
with:
73+
include: 'v*'
74+
exclude: '*-rc*'
75+
commit-ish: '@'
76+
skip-unshallow: 'true'
77+
78+
- name: Previous Tag
79+
id: last
80+
uses: jimschubert/query-tag-action@v1
81+
with:
82+
include: 'v*'
83+
exclude: ${{steps.current.outputs.tag}}
84+
skip-unshallow: 'true'
85+
86+
- name: Generate changelog
87+
uses: jimschubert/beast-changelog-action@v1
88+
with:
89+
GITHUB_TOKEN: ${{github.token}}
90+
CONFIG_LOCATION: .github/changelog.json
91+
FROM: ${{steps.last.outputs.tag}}
92+
TO: ${{steps.current.outputs.tag}}
93+
OUTPUT: .github/CHANGELOG.md
94+
95+
- name: Read CHANGELOG file
96+
id: getchangelog
97+
run: echo "::set-output name=changelog::$(cat .github/CHANGELOG.md)"
98+
99+
- name: View Changelog
100+
run: cat .github/CHANGELOG.md
101+
102+
- name: Add Artifact
103+
uses: actions/upload-artifact@v2
104+
with:
105+
name: out
106+
path: .github/CHANGELOG.md
107+
108+
jar:
109+
name: Create JAR
110+
runs-on: ubuntu-20.04
111+
needs: [vars, changelog]
112+
steps:
113+
- name: Download Changelog Results
114+
uses: actions/download-artifact@v2
115+
with:
116+
name: out
117+
path: changelog
118+
119+
- name: Checkout
120+
uses: actions/checkout@v2
121+
122+
- name: Unshallow
123+
run: git fetch --prune --unshallow
124+
125+
- name: Set up JDK
126+
uses: actions/setup-java@v2
127+
with:
128+
distribution: 'temurin'
129+
java-version: "17"
130+
131+
- name: Grant execute permission for gradlew
132+
run: chmod +x gradlew
133+
134+
- name: Data-generated assets
135+
run: ./gradlew runData
136+
env:
137+
CM_RELEASE: true
138+
GITHUB_ACTOR: ${{ secrets.GITHUB_ACTOR }}
139+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
140+
141+
- name: Build JAR with Gradle
142+
run: ./gradlew build
143+
env:
144+
CM_RELEASE: true
145+
GITHUB_ACTOR: ${{ secrets.GITHUB_ACTOR }}
146+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
147+
148+
- name: Output Dir Structure
149+
run: ls -lhR build-out
150+
151+
- name: Add Artifact
152+
uses: actions/upload-artifact@v2
153+
with:
154+
name: libs
155+
path: |
156+
build-out/${{ needs.vars.outputs.mod_id }}-${{ needs.vars.outputs.version }}.jar
157+
build-out/${{ needs.vars.outputs.mod_id }}-${{ needs.vars.outputs.version }}-api.jar
158+
159+
view:
160+
name: View Changelog Output
161+
runs-on: ubuntu-20.04
162+
needs: [changelog]
163+
steps:
164+
- name: Download Build Results
165+
uses: actions/download-artifact@v2
166+
with:
167+
name: out
168+
path: changelog
169+
- run: cat changelog/CHANGELOG.md

.github/workflows/manual-gh-packages.yml

Lines changed: 4 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -114,22 +114,13 @@ jobs:
114114
distribution: 'temurin'
115115
java-version: "17"
116116

117-
- name: Cache Gradle packages
118-
uses: actions/cache@v2
119-
with:
120-
path: |
121-
~/.gradle/caches
122-
~/.gradle/wrapper
123-
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }}
124-
restore-keys: ${{ runner.os }}-gradle-
125-
126117
- name: Grant execute permission for gradlew
127118
run: chmod +x gradlew
128119

129-
- name: Publish package
130-
run: ./gradlew publishMavenPublicationToGitHubPackagesRepository -x test
120+
- name: Publish JAR with Gradle
121+
run: ./gradlew publishReleasePublicationToGitHubPackagesRepository -x test
131122
env:
132-
CM_RELEASE: "true"
123+
CM_RELEASE: true
133124
GITHUB_ACTOR: ${{ secrets.GITHUB_ACTOR }}
134125
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
135126

@@ -151,4 +142,4 @@ jobs:
151142
with:
152143
name: out
153144
path: changelog
154-
- run: cat changelog/CHANGELOG.md
145+
- run: cat changelog/CHANGELOG.md

0 commit comments

Comments
 (0)