diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..289182f --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,29 @@ +name: "Publish release" + +on: + push: + tags: + - '(0|[1-9]\d*)\.(0|[1-9]\d*)\.(0|[1-9]\d*)' + +jobs: + release-build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4.1.1 + - uses: actions/setup-java@v3.13.0 + with: + distribution: temurin + java-version: 17 + - name: Set up Gradle + uses: gradle/gradle-build-action@v2.9.0 + with: + cache-read-only: ${{ github.ref != 'refs/heads/main' }} + + - name: Execute Gradle build + run: ./gradlew build + + - name: Publish release to Gradle Plugin Portal + run: "./gradlew :publishPlugins --no-configuration-cache" + env: + GRADLE_PUBLISH_KEY: ${{ secrets.GRADLE_PUBLISH_KEY }} + GRADLE_PUBLISH_SECRET: ${{ secrets.GRADLE_PUBLISH_SECRET }}