From 4963f071d4d571b3c63b707610756c0215a2f75d Mon Sep 17 00:00:00 2001 From: SpikeHD Date: Thu, 21 Apr 2022 20:52:23 -0700 Subject: [PATCH 1/6] create empty action file --- .github/workflows/build.yml | 0 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 .github/workflows/build.yml diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 000000000..e69de29bb From 36e18277d4e5b323ce48cfc2f3ceb69ebeaee056 Mon Sep 17 00:00:00 2001 From: SpikeHD Date: Thu, 21 Apr 2022 20:55:43 -0700 Subject: [PATCH 2/6] begin compile env setup --- .github/workflows/build.yml | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index e69de29bb..8e5b8391a 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -0,0 +1,12 @@ +name: "Build" +on: "Push" +jobs: + Build-Server-Jar: + runs-on: windows-latest + steps: + - uses: actions/checkout@v3 + - uses: actions/setup-java@v3 + with: + distribution: temurin + java-version: '8' + - run: gradlew From b4dd5c81d006975afa7f5147f6ae1f59613d8f53 Mon Sep 17 00:00:00 2001 From: SpikeHD Date: Thu, 21 Apr 2022 20:57:30 -0700 Subject: [PATCH 3/6] Update build.yml --- .github/workflows/build.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 8e5b8391a..ce4f17416 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -1,12 +1,12 @@ name: "Build" -on: "Push" +on: "push" jobs: Build-Server-Jar: runs-on: windows-latest steps: - uses: actions/checkout@v3 - uses: actions/setup-java@v3 - with: - distribution: temurin - java-version: '8' + with: + distribution: temurin + java-version: '8' - run: gradlew From d84d7d48aa865c59993395a78b56051b5e1bb379 Mon Sep 17 00:00:00 2001 From: SpikeHD Date: Thu, 21 Apr 2022 21:04:00 -0700 Subject: [PATCH 4/6] build steps --- .github/workflows/build.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index ce4f17416..29bbfdd04 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -4,9 +4,10 @@ jobs: Build-Server-Jar: runs-on: windows-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v2 - uses: actions/setup-java@v3 with: distribution: temurin java-version: '8' - - run: gradlew + - run: .\gradlew.bat + - run: .\gradlew jar From e576884b05dabae12da82d6b1c29989a68e50fe6 Mon Sep 17 00:00:00 2001 From: SpikeHD Date: Thu, 21 Apr 2022 21:13:38 -0700 Subject: [PATCH 5/6] upload artifact --- .github/workflows/build.yml | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 29bbfdd04..b8efbad05 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -4,10 +4,18 @@ jobs: Build-Server-Jar: runs-on: windows-latest steps: - - uses: actions/checkout@v2 - - uses: actions/setup-java@v3 + - name: Checkout + uses: actions/checkout@v2 + - name: Setup Java + uses: actions/setup-java@v3 with: distribution: temurin java-version: '8' - - run: .\gradlew.bat - - run: .\gradlew jar + - name: Run Gradle + run: .\gradlew.bat && .\gradlew jar + - name: Upload build + uses: actions/upload-artifact@v3 + with: + name: Grasscutter + path: grasscutter.jar + From 99c9f0111b9e334e9e364ed56ab827317f776b87 Mon Sep 17 00:00:00 2001 From: SpikeHD Date: Thu, 21 Apr 2022 21:21:08 -0700 Subject: [PATCH 6/6] only build on stable --- .github/workflows/build.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index b8efbad05..8457bf7ac 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -1,5 +1,8 @@ name: "Build" -on: "push" +on: + push: + branches: + - "stable" jobs: Build-Server-Jar: runs-on: windows-latest