-
Notifications
You must be signed in to change notification settings - Fork 105
68 lines (58 loc) · 2.25 KB
/
nightly.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
name: Nightly Build
env:
CI: true
BUILD_NUMBER: ${{ github.run_number }}
NIGHTLY: true
# Run on all develop pushes
on:
push:
branches:
- 'dev/*'
# Cancel if a new push is sent
# https://stackoverflow.com/a/70972844
concurrency:
group: ${{ github.ref }}
cancel-in-progress: true
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up JDK
uses: actions/setup-java@v2
with:
java-version: '17'
distribution: 'temurin'
- name: Make gradlew executable
run: chmod +x ./gradlew
- name: Build
uses: gradle/gradle-build-action@v2
with:
arguments: build
- uses: actions/upload-artifact@v3
with:
name: nightly-build
path: build/libs/*.jar
- name: Discord Notification Success
uses: tsickert/[email protected]
with:
webhook-url: ${{ secrets.NIGHTLY_DISCORD_WEBHOOK }}
embed-title: New Nightly Build
embed-description: A new nightly build of Ender IO has been built from the following commit. If you play with this, please remember to report issues! ```${{ github.event.head_commit.message }}```
avatar-url: https://raw.githubusercontent.com/Team-EnderIO/EnderIO/dev/1.20.1/doc/img/enderface.png
username: Ender IO Nightowl
embed-footer-text: Build number ${{ github.run_number }}
embed-url: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}
embed-color: 5763719
- name: Discord Notification Failure
if: failure()
uses: tsickert/[email protected]
with:
webhook-url: ${{ secrets.NIGHTLY_DISCORD_WEBHOOK }}
embed-title: Nightly Build Failed
embed-description: The nightly build failed to compile at this commit. ```${{ github.event.head_commit.message }}```
avatar-url: https://raw.githubusercontent.com/Team-EnderIO/EnderIO/dev/1.20.1/doc/img/gray-enderface.png
username: Ender IO Nightowl
embed-footer-text: Build number ${{ github.run_number }}
embed-url: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}
embed-color: 15548997