mirror of
https://github.com/LeavesMC/Leaves.git
synced 2025-12-31 12:56:28 +00:00
56 lines
1.8 KiB
YAML
56 lines
1.8 KiB
YAML
# This workflow uses actions that are not certified by GitHub.
|
|
# They are provided by a third-party and are governed by
|
|
# separate terms of service, privacy policy, and support
|
|
# documentation.
|
|
# This workflow will build a Java project with Gradle and cache/restore any dependencies to improve the workflow execution time
|
|
# For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-gradle
|
|
|
|
name: Leaves CI
|
|
|
|
on:
|
|
push:
|
|
branches: [ master ]
|
|
pull_request:
|
|
branches: [ master ]
|
|
|
|
jobs:
|
|
build:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Get repository
|
|
uses: actions/checkout@v3
|
|
with:
|
|
fetch-depth: 0
|
|
- name: Set up JDK 17
|
|
uses: actions/setup-java@v2
|
|
with:
|
|
java-version: '17'
|
|
distribution: 'adopt'
|
|
- name: Setup Git Config
|
|
run: |
|
|
git config --global user.email "ci@leavesmc.top"
|
|
git config --global user.name "Leaves CI"
|
|
- name: Apply Patches
|
|
uses: gradle/gradle-build-action@937999e9cc2425eddc7fd62d1053baf041147db7
|
|
with:
|
|
arguments: applyPatches
|
|
- name: Paperclip Jar
|
|
uses: gradle/gradle-build-action@937999e9cc2425eddc7fd62d1053baf041147db7
|
|
with:
|
|
arguments: createReobfPaperclipJar
|
|
- name: Rename Jar And Set env
|
|
run: |
|
|
mv build/libs/Leaves-paperclip-1.19.2-R0.1-SNAPSHOT-reobf.jar leaves-1.19.2.jar
|
|
echo "name=Leaves-`git rev-parse --short HEAD`" >> $GITHUB_ENV
|
|
echo "tag=1.19.2-`git rev-parse --short HEAD`" >> $GITHUB_ENV
|
|
sh scripts/GetReleaseInfo.sh
|
|
- name: Create Release
|
|
uses: ncipollo/release-action@v1
|
|
with:
|
|
artifacts: leaves-1.19.2.jar
|
|
bodyFile: "releaseinfo.md"
|
|
tag: ${{ env.tag }}
|
|
prerelease: false
|
|
name: ${{ env.name }}
|
|
token: ${{ secrets.GITHUB_TOKEN }}
|