Skip to content

Commit

Permalink
Use composite gradle setup action
Browse files Browse the repository at this point in the history
  • Loading branch information
Kas-tle authored May 28, 2024
1 parent bfee58d commit 37d35c7
Showing 1 changed file with 14 additions and 24 deletions.
38 changes: 14 additions & 24 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,38 +14,19 @@ jobs:
runs-on: ubuntu-latest

steps:
- name: Checkout repository
# See https://github.com/actions/checkout/commits
uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4.1.6

- name: Validate Gradle Wrapper
# See https://github.com/gradle/wrapper-validation-action/commits
uses: gradle/actions/wrapper-validation@db19848a5fa7950289d3668fb053140cf3028d43 # v3.3.2

- name: Setup Java
# See https://github.com/actions/setup-java/commits
uses: actions/setup-java@99b8673ff64fbf99d8d325f52d9a5bdedb8483e9 # v4.2.1
with:
java-version: 17
distribution: temurin

- name: Setup Gradle
# See https://github.com/gradle/actions/commits
uses: gradle/actions/setup-gradle@417ae3ccd767c252f5661f1ace9f835f9654f2b5 # v3.1.0
uses: GeyserMC/actions/setup-gradle-composite@master
with:
gradle-home-cache-cleanup: true
setup-java_java-version: 17

- name: Build ThirdPartyCosmetics
run: ./gradlew build

- name: Archive artifacts
# See https://github.com/actions/upload-artifact/commits
uses: actions/upload-artifact@65462800fd760344b1a7b4382951275a0abb4808 # v4.3.3
- name: Archive Artifacts
uses: GeyserMC/actions/upload-multi-artifact@master
if: success()
with:
name: ThirdPartyCosmetics
path: build/libs/ThirdPartyCosmetics.jar
if-no-files-found: error
artifacts: build/libs/ThirdPartyCosmetics.jar

- name: Get Version
if: ${{ success() && github.repository == 'GeyserMC/ThirdPartyCosmetics' && github.ref_name == 'master' }}
Expand Down Expand Up @@ -77,3 +58,12 @@ jobs:
host: ${{ secrets.DOWNLOADS_SERVER_IP }}
files: |
build/libs/ThirdPartyCosmetics.jar
changelog: ${{ steps.metadata.outputs.body }}

- name: Notify Discord
if: ${{ (success() || failure()) && github.repository == 'GeyserMC/ThirdPartyCosmetics' }}
uses: GeyserMC/actions/notify-discord@master
with:
discordWebhook: ${{ secrets.TEST_DISCORD_WEBHOOK }}
status: ${{ job.status }}
body: ${{ steps.metadata.outputs.body }}

0 comments on commit 37d35c7

Please sign in to comment.