Java Release Build #4
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Java Release Build | |
on: | |
workflow_dispatch: | |
inputs: | |
scope: | |
default: minor | |
description: Which version number gets incremented (one of major, minor, patch) | |
required: true | |
stage: | |
default: beta | |
description: What kind of release is this? (one of beta, rc, final) | |
required: true | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Set up JDK 11 | |
uses: actions/setup-java@v2 | |
with: | |
java-version: '11' | |
distribution: 'adopt' | |
- name: Validate Gradle wrapper | |
uses: gradle/wrapper-validation-action@8d49e559aae34d3e0eb16cde532684bc9702762b | |
- name: Build & Test | |
# https://github.com/burrunan/gradle-cache-action | |
uses: burrunan/gradle-cache-action@a54b6ce2cbbba932e5d142129dddef103e6ad143 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
# Building & Testing the examples project so that we can do everything in 1 build | |
build-root-directory: examples | |
arguments: :plugin:assemble :plugin:check assemble check --continue --stacktrace | |
- name: Publish Release | |
if: github.ref == 'refs/heads/main' | |
uses: burrunan/gradle-cache-action@a54b6ce2cbbba932e5d142129dddef103e6ad143 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
build-root-directory: plugin | |
arguments: publishPlugins --continue --stacktrace | |
execution-only-caches: true | |
properties: | | |
reckon.scope=${{ github.event.inputs.scope }} | |
reckon.stage=${{ github.event.inputs.stage }} | |
gradle.publish.key=${{ secrets.GRADLE_PUBLISH_KEY }} | |
gradle.publish.secret=${{ secrets.GRADLE_PUBLISH_SECRET }} | |