From 5bb786e2cf62a91d683c52f92c05ee8037600f1b Mon Sep 17 00:00:00 2001 From: "Jack Gabriel C. Acodili" <112671361+acodili-jg@users.noreply.github.com> Date: Wed, 26 Jul 2023 09:30:40 +0800 Subject: [PATCH 01/21] Create build.yml --- .github/actions/build.yml | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 .github/actions/build.yml diff --git a/.github/actions/build.yml b/.github/actions/build.yml new file mode 100644 index 0000000..2410897 --- /dev/null +++ b/.github/actions/build.yml @@ -0,0 +1,32 @@ +name: Build +description: Builds the sources and captures the compile jar + +inputs: + capture-artifacts: + description: Should artifacts be captured + required: false + default: true + +runs: + using: composite + steps: + - name: Checkout repository + uses: actions/checkout@v3 + - name: Validate Gradle wrapper + uses: gradle/wrapper-validation-action@v1 + - name: Set-up JDK 17 + uses: actions/setup-java@v3 + with: + java-version: 17 + distribution: 'temurin' + - name: Make Gradle wrapper executable + if: ${{ runner.os != 'Windows' }} + run: chmod +x ./gradlew + - name: Build + run: ./gradlew build + - name: Capture build artifacts + if: ${{ inputs.capture-artifacts }} + uses: actions/upload-artifact@v3 + with: + name: Artifacts + path: build/libs/ From 47ce295d63ec240dff428c3b5f8f10a2a1b8dea9 Mon Sep 17 00:00:00 2001 From: "Jack Gabriel C. Acodili" <112671361+acodili-jg@users.noreply.github.com> Date: Wed, 26 Jul 2023 09:52:07 +0800 Subject: [PATCH 02/21] Update build.yml to use the action --- .github/workflows/build.yml | 20 ++------------------ 1 file changed, 2 insertions(+), 18 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 820f211..0875601 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -5,21 +5,5 @@ jobs: build: runs-on: ubuntu-22.04 steps: - - name: Checkout repository - uses: actions/checkout@v3 - - name: Validate Gradle wrapper - uses: gradle/wrapper-validation-action@v1 - - name: Set-up JDK 17 - uses: actions/setup-java@v3 - with: - java-version: 17 - distribution: 'temurin' - - name: Make Gradle wrapper executable - run: chmod +x ./gradlew - - name: Build - run: ./gradlew build - - name: Capture build artifacts - uses: actions/upload-artifact@v3 - with: - name: Artifacts - path: build/libs/ + - name: Build and capture artifacts + uses: ./.github/actions/build From 9a53508060c5ac816ce58f7db71a489e25a4b34f Mon Sep 17 00:00:00 2001 From: "Jack Gabriel C. Acodili" <112671361+acodili-jg@users.noreply.github.com> Date: Wed, 26 Jul 2023 09:53:35 +0800 Subject: [PATCH 03/21] Remove checkout --- .github/actions/build.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/.github/actions/build.yml b/.github/actions/build.yml index 2410897..ddb4f14 100644 --- a/.github/actions/build.yml +++ b/.github/actions/build.yml @@ -10,8 +10,6 @@ inputs: runs: using: composite steps: - - name: Checkout repository - uses: actions/checkout@v3 - name: Validate Gradle wrapper uses: gradle/wrapper-validation-action@v1 - name: Set-up JDK 17 From 784300a8e80c27dd2ac9939b884d6062a408638a Mon Sep 17 00:00:00 2001 From: "Jack Gabriel C. Acodili" <112671361+acodili-jg@users.noreply.github.com> Date: Wed, 26 Jul 2023 09:54:17 +0800 Subject: [PATCH 04/21] Added checkout --- .github/workflows/build.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 0875601..6bd7e42 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -5,5 +5,7 @@ jobs: build: runs-on: ubuntu-22.04 steps: + - name: Checkout repository + uses: actions/checkout@v3 - name: Build and capture artifacts uses: ./.github/actions/build From 1814f464a43cface35c8c426629ff364783917a7 Mon Sep 17 00:00:00 2001 From: "Jack Gabriel C. Acodili" <112671361+acodili-jg@users.noreply.github.com> Date: Wed, 26 Jul 2023 09:55:17 +0800 Subject: [PATCH 05/21] Fix path --- .github/workflows/build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 6bd7e42..aa5fd79 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -8,4 +8,4 @@ jobs: - name: Checkout repository uses: actions/checkout@v3 - name: Build and capture artifacts - uses: ./.github/actions/build + uses: .github/actions/build From eb449efc5929ffb4c68616468c0d9c93e7423b77 Mon Sep 17 00:00:00 2001 From: "Jack Gabriel C. Acodili" <112671361+acodili-jg@users.noreply.github.com> Date: Wed, 26 Jul 2023 09:56:23 +0800 Subject: [PATCH 06/21] Fix path 2: Electric boogaloo --- .github/workflows/build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index aa5fd79..53a7c2b 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -8,4 +8,4 @@ jobs: - name: Checkout repository uses: actions/checkout@v3 - name: Build and capture artifacts - uses: .github/actions/build + uses: ../.github/actions/build From b179dacb599967b490cf1a19bf69b43f3b145587 Mon Sep 17 00:00:00 2001 From: "Jack Gabriel C. Acodili" <112671361+acodili-jg@users.noreply.github.com> Date: Wed, 26 Jul 2023 09:57:39 +0800 Subject: [PATCH 07/21] Unfix path --- .github/workflows/build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 53a7c2b..6bd7e42 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -8,4 +8,4 @@ jobs: - name: Checkout repository uses: actions/checkout@v3 - name: Build and capture artifacts - uses: ../.github/actions/build + uses: ./.github/actions/build From f7c79e520d6d340740a62d4fac3db959bc741cf6 Mon Sep 17 00:00:00 2001 From: "Jack Gabriel C. Acodili" <112671361+acodili-jg@users.noreply.github.com> Date: Wed, 26 Jul 2023 09:58:23 +0800 Subject: [PATCH 08/21] Add extension? --- .github/workflows/build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 6bd7e42..c3a168e 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -8,4 +8,4 @@ jobs: - name: Checkout repository uses: actions/checkout@v3 - name: Build and capture artifacts - uses: ./.github/actions/build + uses: ./.github/actions/build.yml From 853d0ee1354530ef1095d13e4e58694d8d74b037 Mon Sep 17 00:00:00 2001 From: "Jack Gabriel C. Acodili" <112671361+acodili-jg@users.noreply.github.com> Date: Wed, 26 Jul 2023 09:59:23 +0800 Subject: [PATCH 09/21] Update build.yml --- .github/workflows/build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index c3a168e..6bd7e42 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -8,4 +8,4 @@ jobs: - name: Checkout repository uses: actions/checkout@v3 - name: Build and capture artifacts - uses: ./.github/actions/build.yml + uses: ./.github/actions/build From 88e673211e0855b78ee6780dfe67b6a831ecaac8 Mon Sep 17 00:00:00 2001 From: "Jack Gabriel C. Acodili" <112671361+acodili-jg@users.noreply.github.com> Date: Wed, 26 Jul 2023 10:04:15 +0800 Subject: [PATCH 10/21] Try this link The link: https://github.com/orgs/community/discussions/26245#discussioncomment-3310465 --- .github/workflows/build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 6bd7e42..0d505b0 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -8,4 +8,4 @@ jobs: - name: Checkout repository uses: actions/checkout@v3 - name: Build and capture artifacts - uses: ./.github/actions/build + uses: ./.github/actions/build/ From b0a629ccc7d5a7dd69e7671cbf50866f821ce91d Mon Sep 17 00:00:00 2001 From: "Jack Gabriel C. Acodili" <112671361+acodili-jg@users.noreply.github.com> Date: Wed, 26 Jul 2023 10:07:58 +0800 Subject: [PATCH 11/21] Update build.yml --- .github/workflows/build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 0d505b0..6bd7e42 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -8,4 +8,4 @@ jobs: - name: Checkout repository uses: actions/checkout@v3 - name: Build and capture artifacts - uses: ./.github/actions/build/ + uses: ./.github/actions/build From 919bc6fac4849cc0ecd7b544abeb12010594214d Mon Sep 17 00:00:00 2001 From: "Jack Gabriel C. Acodili" <112671361+acodili-jg@users.noreply.github.com> Date: Wed, 26 Jul 2023 10:08:37 +0800 Subject: [PATCH 12/21] Update and rename build.yml to push-build.yml --- .github/workflows/{build.yml => push-build.yml} | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) rename .github/workflows/{build.yml => push-build.yml} (84%) diff --git a/.github/workflows/build.yml b/.github/workflows/push-build.yml similarity index 84% rename from .github/workflows/build.yml rename to .github/workflows/push-build.yml index 6bd7e42..72a21fc 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/push-build.yml @@ -1,5 +1,5 @@ -name: build -on: [pull_request, push] +name: Build on push +on: push jobs: build: From 398f1de3820b7e97b464e203f6cb22e4b4606df8 Mon Sep 17 00:00:00 2001 From: "Jack Gabriel C. Acodili" <112671361+acodili-jg@users.noreply.github.com> Date: Wed, 26 Jul 2023 10:10:06 +0800 Subject: [PATCH 13/21] Update push-build.yml --- .github/workflows/push-build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/push-build.yml b/.github/workflows/push-build.yml index 72a21fc..868c63a 100644 --- a/.github/workflows/push-build.yml +++ b/.github/workflows/push-build.yml @@ -8,4 +8,4 @@ jobs: - name: Checkout repository uses: actions/checkout@v3 - name: Build and capture artifacts - uses: ./.github/actions/build + uses: ./.github/actions/build.yml From 744c4e4397d011c7aed1c5b95fccea6e4789656e Mon Sep 17 00:00:00 2001 From: "Jack Gabriel C. Acodili" <112671361+acodili-jg@users.noreply.github.com> Date: Wed, 26 Jul 2023 10:10:52 +0800 Subject: [PATCH 14/21] Update push-build.yml --- .github/workflows/push-build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/push-build.yml b/.github/workflows/push-build.yml index 868c63a..72a21fc 100644 --- a/.github/workflows/push-build.yml +++ b/.github/workflows/push-build.yml @@ -8,4 +8,4 @@ jobs: - name: Checkout repository uses: actions/checkout@v3 - name: Build and capture artifacts - uses: ./.github/actions/build.yml + uses: ./.github/actions/build From 25dbdae833c2acf0a364d0034c62411abd553ca6 Mon Sep 17 00:00:00 2001 From: "Jack Gabriel C. Acodili" <112671361+acodili-jg@users.noreply.github.com> Date: Wed, 26 Jul 2023 10:12:36 +0800 Subject: [PATCH 15/21] =?UTF-8?q?Mistake=20noticed=20=F0=9F=A4=A6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Should've read the docs (lol) --- .github/actions/{build.yml => build/action.yml} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename .github/actions/{build.yml => build/action.yml} (100%) diff --git a/.github/actions/build.yml b/.github/actions/build/action.yml similarity index 100% rename from .github/actions/build.yml rename to .github/actions/build/action.yml From 698c3c213222aa7edf0db81f4ebf164d7499ce4c Mon Sep 17 00:00:00 2001 From: "Jack Gabriel C. Acodili" <112671361+acodili-jg@users.noreply.github.com> Date: Wed, 26 Jul 2023 10:14:51 +0800 Subject: [PATCH 16/21] Bashed runs --- .github/actions/build/action.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/actions/build/action.yml b/.github/actions/build/action.yml index ddb4f14..cca31bb 100644 --- a/.github/actions/build/action.yml +++ b/.github/actions/build/action.yml @@ -20,8 +20,10 @@ runs: - name: Make Gradle wrapper executable if: ${{ runner.os != 'Windows' }} run: chmod +x ./gradlew + shell: bash - name: Build run: ./gradlew build + shell: bash - name: Capture build artifacts if: ${{ inputs.capture-artifacts }} uses: actions/upload-artifact@v3 From 446f78dd3181ebe07db0bf0f16bc6266c9727a9b Mon Sep 17 00:00:00 2001 From: "Jack Gabriel C. Acodili" <112671361+acodili-jg@users.noreply.github.com> Date: Wed, 26 Jul 2023 10:17:31 +0800 Subject: [PATCH 17/21] Title case job names - based on the "Post" suffixes --- .github/actions/build/action.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/actions/build/action.yml b/.github/actions/build/action.yml index cca31bb..e1fc724 100644 --- a/.github/actions/build/action.yml +++ b/.github/actions/build/action.yml @@ -10,21 +10,21 @@ inputs: runs: using: composite steps: - - name: Validate Gradle wrapper + - name: Validate Gradle Wrapper uses: gradle/wrapper-validation-action@v1 - name: Set-up JDK 17 uses: actions/setup-java@v3 with: java-version: 17 distribution: 'temurin' - - name: Make Gradle wrapper executable + - name: Make Gradle Wrapper Executable if: ${{ runner.os != 'Windows' }} run: chmod +x ./gradlew shell: bash - name: Build run: ./gradlew build shell: bash - - name: Capture build artifacts + - name: Capture Build Artifacts if: ${{ inputs.capture-artifacts }} uses: actions/upload-artifact@v3 with: From 4e47dea69c30ec6d131811cdcfa5f48e46005438 Mon Sep 17 00:00:00 2001 From: "Jack Gabriel C. Acodili" <112671361+acodili-jg@users.noreply.github.com> Date: Wed, 26 Jul 2023 10:18:27 +0800 Subject: [PATCH 18/21] Consistency with GitHub: Set up instead of Set-up --- .github/actions/build/action.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/actions/build/action.yml b/.github/actions/build/action.yml index e1fc724..32ba44b 100644 --- a/.github/actions/build/action.yml +++ b/.github/actions/build/action.yml @@ -12,7 +12,7 @@ runs: steps: - name: Validate Gradle Wrapper uses: gradle/wrapper-validation-action@v1 - - name: Set-up JDK 17 + - name: Set up JDK 17 uses: actions/setup-java@v3 with: java-version: 17 From 6175a59950ef13ab8eb80c5b3d0e1cdce4bc0f9a Mon Sep 17 00:00:00 2001 From: "Jack Gabriel C. Acodili" <112671361+acodili-jg@users.noreply.github.com> Date: Wed, 26 Jul 2023 10:21:39 +0800 Subject: [PATCH 19/21] Revert title case --- .github/actions/build/action.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/actions/build/action.yml b/.github/actions/build/action.yml index 32ba44b..7470800 100644 --- a/.github/actions/build/action.yml +++ b/.github/actions/build/action.yml @@ -17,14 +17,14 @@ runs: with: java-version: 17 distribution: 'temurin' - - name: Make Gradle Wrapper Executable + - name: Make Gradle Wrapper executable if: ${{ runner.os != 'Windows' }} run: chmod +x ./gradlew shell: bash - name: Build run: ./gradlew build shell: bash - - name: Capture Build Artifacts + - name: Capture build artifacts if: ${{ inputs.capture-artifacts }} uses: actions/upload-artifact@v3 with: From 7f20f2023c3708b8201d2594d42e52fe5d0da48e Mon Sep 17 00:00:00 2001 From: "Jack Gabriel C. Acodili" <112671361+acodili-jg@users.noreply.github.com> Date: Wed, 26 Jul 2023 10:22:11 +0800 Subject: [PATCH 20/21] Update description --- .github/actions/build/action.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/actions/build/action.yml b/.github/actions/build/action.yml index 7470800..7e0c398 100644 --- a/.github/actions/build/action.yml +++ b/.github/actions/build/action.yml @@ -1,5 +1,5 @@ name: Build -description: Builds the sources and captures the compile jar +description: Builds and captures the compiled jar inputs: capture-artifacts: From eb7ba2196e2566ac72e946d91a2a44b853bdfbe4 Mon Sep 17 00:00:00 2001 From: "Jack Gabriel C. Acodili" <112671361+acodili-jg@users.noreply.github.com> Date: Wed, 26 Jul 2023 10:23:57 +0800 Subject: [PATCH 21/21] Create pull-build --- .github/workflows/pull-build | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 .github/workflows/pull-build diff --git a/.github/workflows/pull-build b/.github/workflows/pull-build new file mode 100644 index 0000000..f491914 --- /dev/null +++ b/.github/workflows/pull-build @@ -0,0 +1,11 @@ +name: Build on pull +on: pull_request + +jobs: + build: + runs-on: ubuntu-22.04 + steps: + - name: Checkout repository + uses: actions/checkout@v3 + - name: Build and capture artifacts + uses: ./.github/actions/build