-
Notifications
You must be signed in to change notification settings - Fork 7
46 lines (46 loc) · 1.87 KB
/
sendpreview.yml
File metadata and controls
46 lines (46 loc) · 1.87 KB
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
on: push
name: Upload jar to testing channel
jobs:
build-and-send:
name: Build Jar and send to Discord
runs-on: ubuntu-18.04
steps:
- uses: actions/checkout@master
with:
fetch-depth: 0
- name: Get branch name
shell: bash
run: echo "::set-output name=branch::${GITHUB_REF#refs/heads/}"
id: get_branch
- name: Get latest commit short
run: echo "::set-output name=commit::$(git rev-parse --short HEAD)"
id: get_commit
- name: Send building message to discord
uses: fateyan/action-discord-notifier@v1.2.0
with:
webhook: ${{ secrets.DISCORD_WEBHOOK }}
message-title: "Building mod from branch ${{ steps.get_branch.outputs.branch }}"
- name: Set up JDK 8
uses: actions/setup-java@v1
with:
java-version: 1.8
java-package: jdk
architecture: x64
- name: Grant execute permission for gradlew
run: chmod +x gradlew
- name: Build jar
id: build-jar
uses: eskatos/gradle-command-action@v1
with:
arguments: jar --max-workers 1
wrapper-cache-enabled: true
dependencies-cache-enabled: true
configuration-cache-enabled: true
env:
CA_VERSION: preview-${{ steps.get_commit.outputs.commit }}
- name: Send built file to discord
uses: sinshutu/upload-to-discord@master
env:
DISCORD_WEBHOOK: ${{ secrets.DISCORD_WEBHOOK }}
with:
args: ./build/libs/*.*