This repository has been archived by the owner on Apr 18, 2024. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 3
58 lines (57 loc) · 1.97 KB
/
build.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
name: Build
on:
push:
branches:
- v3
jobs:
build:
runs-on: ubuntu-latest
if: "!contains(github.event.commits[0].message, '[ci-skip]')"
steps:
- uses: actions/checkout@v2
- uses: actions/setup-java@v2
with:
distribution: temurin
java-version: 17
- uses: actions/setup-node@v3
with:
node-version: 16
- name: Import gradle properties
shell: bash
run: cat gradle.properties >> $GITHUB_ENV
- name: Build
run: ./gradlew build modrinth --stacktrace
env:
MODRINTH_TOKEN: ${{ secrets.MODRINTH_TOKEN }}
COMMIT_MESSAGE: ${{ join(github.event.commits.*.message, '<br>') }}
- name: Generate Javadoc
run: ./gradlew javadoc
- name: Deploy Javadoc
uses: JamesIves/github-pages-deploy-action@v4
with:
token: ${{ secrets.GITHUB_TOKEN }}
branch: javadoc
clean: true
folder: core/build/docs/javadoc
target-folder: ./
- name: Notify Discord
uses: BillyGalbreath/actions-status-discord@main
if: success()
with:
webhook: ${{ secrets.DISCORD_WEBHOOK }}
noprefix: true
title: New build of Pl3xMap is ready!
description: |
Version ${{ env.minecraftVersion }} build ${{ github.run_number }}
Click [here](https://modrinth.com/mod/pl3xmap/version/${{ env.minecraftVersion }}-${{ github.run_number }}) to download!
- name: Notify Discord
uses: BillyGalbreath/actions-status-discord@main
if: ${{ failure() }}
with:
webhook: ${{ secrets.DISCORD_WEBHOOK }}
noprefix: true
title: Build Failure!
color: 0xff0000
description: |
Version ${{ env.minecraftVersion }} build ${{ github.run_number }}
Click [here](${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}) to view the run!