-
Notifications
You must be signed in to change notification settings - Fork 6
44 lines (40 loc) · 1.34 KB
/
upstream.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
name: Update Upstream
on:
schedule:
- cron: '0 15 * * *' # Once a day at 5pm GMT+2
workflow_dispatch: # on button click
jobs:
upstream:
runs-on: ubuntu-latest
steps:
- name: Checkout Git Repository
uses: actions/checkout@v4
- name: Set up JDK
uses: actions/setup-java@v4
with:
java-version: '21'
cache: 'gradle'
distribution: 'temurin'
- name: Configure Git User Details
run: git config --global user.email "actions@github.com" && git config --global user.name "Github Actions"
- name: Update Upstream Commit Hash
run: ./gradlew purpurRefLatest --stacktrace
- name: Apply Patches
run: ./gradlew applyPatches --stacktrace
- name: Build Paperclip jar
run: ./gradlew jar createMojmapPaperclipJar --stacktrace
- name: Rebuild Patches
run: ./gradlew rebuildPatches --stacktrace
- name: Upload Paperclip jar
uses: actions/upload-artifact@v4
with:
name: shreddedpaper.jar
path: build/libs/shreddedpaper-paperclip-*-mojmap.jar
- name: Create Pull Request
uses: peter-evans/create-pull-request@v6
with:
commit-message: Update Upstream
branch: update-upstream
delete-branch: true
title: 'Update Upstream'
body: ''