From e069e6599ce649812e067a6f3a55c8d95d613848 Mon Sep 17 00:00:00 2001 From: minemobs Date: Sun, 4 Aug 2024 15:42:18 +0200 Subject: [PATCH] Added github action --- .github/workflows/gradle.yml | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 .github/workflows/gradle.yml diff --git a/.github/workflows/gradle.yml b/.github/workflows/gradle.yml new file mode 100644 index 00000000..511e3e71 --- /dev/null +++ b/.github/workflows/gradle.yml @@ -0,0 +1,36 @@ +name: Java CI with Gradle + +on: + push: + branches: [ "1.18.2", "1.19.2" ] + pull_request: + branches: [ "1.18.2", "1.19.2" ] + +jobs: + build: + runs-on: ubuntu-latest + permissions: + id-token: write + contents: read + attestations: write + steps: + - uses: actions/checkout@v4 + - name: Set up JDK 17 + uses: actions/setup-java@v4 + with: + java-version: '17' + distribution: 'temurin' + + - name: Setup Gradle + uses: gradle/actions/setup-gradle@v4 + run: gradle build + with: + gradle-version: '8.5' + + - name: Rename jar + run: mv $(find build/libs/ | grep -P "\d\.jar") constructarmory.jar + + - name: Generate artifact attestation + uses: actions/attest-build-provenance@v1 + with: + path: ./constructarmory.jar