From 430ec95e9d5ce375b9e71046409928e6c501e528 Mon Sep 17 00:00:00 2001 From: Sebastian Snoer <23051740+Seba244c@users.noreply.github.com> Date: Sat, 30 Mar 2024 22:03:04 +0700 Subject: [PATCH] Create gradle-plugin-publish.yml --- .github/workflows/gradle-plugin-publish.yml | 37 +++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 .github/workflows/gradle-plugin-publish.yml diff --git a/.github/workflows/gradle-plugin-publish.yml b/.github/workflows/gradle-plugin-publish.yml new file mode 100644 index 0000000..be93114 --- /dev/null +++ b/.github/workflows/gradle-plugin-publish.yml @@ -0,0 +1,37 @@ +# This workflow uses actions that are not certified by GitHub. +# They are provided by a third-party and are governed by +# separate terms of service, privacy policy, and support +# documentation. +# This workflow will build a package using Gradle and then publish it to GitHub packages when a release is created +# For more information see: https://github.com/actions/setup-java/blob/main/docs/advanced-usage.md#Publishing-using-gradle + +name: Gradle Plugin Build & Publish + +on: + push: + branches: [ "main" ] + paths: + - spellbook-gradle/** + +jobs: + gradle-build-publish: + runs-on: ubuntu-latest + permissions: + contents: read + packages: write + steps: + - uses: actions/checkout@v3 + - name: Set up JDK 21 + uses: actions/setup-java@v3 + with: + java-version: '21' + distribution: 'temurin' + server-id: github # Value of the distributionManagement/repository/id field of the pom.xml + settings-path: ${{ github.workspace }} # location for the settings.xml file + - name: Build & Publish with Gradle + uses: gradle/gradle-build-action@v2 + - name: Publish + env: + MAVEN_USERNAME: ${{ secrets.REPOSILITE_NAME }} + MAVEN_PASSWORD: ${{ secrets.REPOSILITE_SECRET }} + run: ./gradlew clean :spellbook-gradle:build :spellbook-gradle:publish