-
-
Notifications
You must be signed in to change notification settings - Fork 5
47 lines (42 loc) · 1.39 KB
/
gradle.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
name: Build and Archive Jars
on:
push:
branches:
- origin
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Set up Java
uses: actions/setup-java@v2
with:
java-version: 21
distribution: 'adopt'
- name: Build and Publish
run: |
chmod +x ./gradlew
./gradlew build
env:
GIT_TOKEN: ${{ secrets.GIT_TOKEN }}
OSSRH_USERNAME: ${{ secrets.OSSRH_USERNAME }}
OSSRH_PASSWORD: ${{ secrets.OSSRH_PASSWORD }}
- name: Set Commit Hash
id: set_commit_hash
run: echo "COMMIT_HASH=$(git log --format='%H' -n 1)" >> $GITHUB_ENV
- name: Release
if: "!contains(github.event.head_commit.message, '--skip') && !contains(github.event.head_commit.commit.message, '--skip')"
uses: softprops/action-gh-release@v1
with:
name: Latest v1.3.0 dev
tag_name: mc1.21/0-v1.3.0
body: \"changes\"=${{ github.event.head_commit.message }}
token: ${{ secrets.GIT_TOKEN }}
files: build/libs/*.jar
- name: Notify Discord
if: ${{ (success() || failure()) }}
uses: Tim203/actions-git-discord-webhook@70f38ded3aca51635ec978ab4e1a58cd4cd0c2ff
with:
webhook_url: ${{ secrets.DISCORD_WEBHOOK }}
status: ${{ job.status }}