Update Upstream (Folia) #638
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Update Upstream (Folia) | |
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@v2 | |
- name: Set up JDK | |
uses: actions/setup-java@v2.5.0 | |
with: | |
java-version: '17' | |
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 foliaRefLatest --stacktrace | |
- name: Apply Patches | |
run: ./gradlew applyPatches --stacktrace | |
- name: Build Paperclip jar | |
run: ./gradlew jar createReobfPaperclipJar --stacktrace | |
- name: Rebuild Patches | |
run: ./gradlew rebuildPatches --stacktrace | |
- name: Upload Paperclip jar | |
uses: actions/upload-artifact@v2 | |
with: | |
name: kaiiju.jar | |
path: build/libs/kaiiju-paperclip-*-reobf.jar | |
- name: Create Pull Request | |
uses: peter-evans/create-pull-request@v3 | |
with: | |
commit-message: Update Upstream (Folia) | |
branch: update-upstream | |
delete-branch: true | |
title: 'Update Upstream (Folia)' | |
body: '' |