From 3004bd98b68f7010da7b5e6b1d850cad5740bcc9 Mon Sep 17 00:00:00 2001 From: Liam Sage Date: Tue, 3 Sep 2024 13:39:49 +0200 Subject: [PATCH] Create gradle-publish.yml --- .github/workflows/gradle-publish.yml | 39 ++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 .github/workflows/gradle-publish.yml diff --git a/.github/workflows/gradle-publish.yml b/.github/workflows/gradle-publish.yml new file mode 100644 index 0000000..c94d89b --- /dev/null +++ b/.github/workflows/gradle-publish.yml @@ -0,0 +1,39 @@ +name: Release Build + +on: + release: + types: [published] + +jobs: + build: + runs-on: ubuntu-latest + + steps: + - name: Checkout code + uses: actions/checkout@v3 + + - name: Set up JDK 21 + uses: actions/setup-java@v3 + with: + distribution: 'temurin' # Optional, defaults to 'temurin' + java-version: '21' + + - name: Grant execute permission for gradlew + run: chmod +x gradlew + + - name: Build with Gradle + run: ./gradlew build + + - name: Upload JAR to Release + uses: actions/upload-artifact@v3 + with: + name: shaderapi-plugin + path: build/libs/*.jar + + - name: Attach JAR to GitHub Release + uses: softprops/action-gh-release@v1 + with: + files: build/libs/*.jar + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} +