-
Notifications
You must be signed in to change notification settings - Fork 69
115 lines (97 loc) · 2.77 KB
/
nightly-builds.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
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
name: Gradle Tests and Nightly (CI)
env:
GH_PKG_URL: "https://maven.pkg.github.com/${{ github.repository }}"
on:
workflow_dispatch:
push:
paths-ignore:
- "README.md"
- "LICENSE"
- ".github/**/*"
jobs:
vars:
name: Get Variables
runs-on: ubuntu-22.04
outputs:
version: ${{steps.version.outputs.version}}
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-tags: true
submodules: true
- name: Version
id: version
uses: paulhatch/semantic-version@v5.3.0
with:
change_path: "neoforge-main"
version_format: "${major}.${minor}.${patch}.${increment}-nightly"
search_commit_body: true
tests:
name: Gradle Tests
runs-on: ubuntu-22.04
needs: [ vars ]
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up JDK
uses: actions/setup-java@v3
with:
distribution: temurin
java-version: 17
- name: Setup Gradle
uses: gradle/actions/setup-gradle@v3
- name: Data Generation
run: ./gradlew runData
env:
GITHUB_ACTOR: ${{ secrets.GITHUB_ACTOR }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Store Built Assets
if: success()
uses: actions/upload-artifact@v3
with:
name: generated-data
path: neoforge-main/src/generated/resources
- name: Game Tests
uses: gradle/gradle-build-action@v2
with:
arguments: runGameTestServer
env:
GITHUB_ACTOR: ${{ secrets.GITHUB_ACTOR }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Upload build failure
if: failure()
uses: actions/upload-artifact@v3
with:
name: test-data
path: run/gametest
publish-gh-package:
name: Publish Github Package - Nightly
runs-on: ubuntu-22.04
needs: [ vars, tests ]
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Set up JDK
uses: actions/setup-java@v3
with:
distribution: temurin
java-version: 17
- name: Setup Gradle
uses: gradle/actions/setup-gradle@v3
- name: Pull Built Generated Data
uses: actions/download-artifact@v3
with:
name: generated-data
path: neoforge-main/src/generated/resources
- name: Publish
run: ./gradlew publish
env:
VERSION: ${{ needs.vars.outputs.version }}
GITHUB_ACTOR: ${{ secrets.GITHUB_ACTOR }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
announce:
name: Discord Announcement
needs: [ publish-gh-package ]
uses: ./.github/workflows/announce-latest-nightly.yml
secrets: inherit