diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 86f975f..9387f3e 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -21,6 +21,10 @@ name: Build on: pull_request: +env: + JAVA_VERSION: '8' + JAVA_DISTRO: 'zulu' + jobs: build: name: Build @@ -30,11 +34,11 @@ jobs: steps: - uses: actions/checkout@v3 - - name: Set up Java + - name: Setup Java uses: actions/setup-java@v3 with: - java-version: 8 - distribution: 'zulu' + java-version: ${{ env.JAVA_VERSION }} + distribution: ${{ env.JAVA_DISTRO }} - uses: actions/cache@v3 with: diff --git a/.github/workflows/early-access.yml b/.github/workflows/early-access.yml index 6465aa8..76f40ce 100644 --- a/.github/workflows/early-access.yml +++ b/.github/workflows/early-access.yml @@ -22,6 +22,10 @@ on: push: branches: [ master ] +env: + JAVA_VERSION: '8' + JAVA_DISTRO: 'zulu' + jobs: earlyaccess: name: EarlyAccess @@ -37,11 +41,11 @@ jobs: with: token: ${{ secrets.GITHUB_TOKEN }} - - name: Set up Java + - name: Setup Java uses: actions/setup-java@v3 with: - java-version: 8 - distribution: 'zulu' + java-version: ${{ env.JAVA_VERSION }} + distribution: ${{ env.JAVA_DISTRO }} - uses: actions/cache@v3 with: diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index f062f70..15de58e 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -25,9 +25,35 @@ on: description: "Release version" required: true +env: + JAVA_VERSION: '11' + JAVA_DISTRO: 'zulu' + jobs: + precheck: + name: Precheck + runs-on: ubuntu-latest + outputs: + VERSION: ${{ steps.vars.outputs.VERSION }} + JAVA_VERSION: ${{ env.JAVA_VERSION }} + JAVA_DISTRO: ${{ env.JAVA_DISTRO }} + steps: + - name: Checkout + uses: actions/checkout@v3 + + - uses: n1hility/cancel-previous-runs@v2 + with: + token: ${{ secrets.GITHUB_TOKEN }} + + - name: Version + id: vars + shell: bash + run: | + echo ::set-output name=VERSION::${{ github.event.inputs.version }} + release: name: Release + needs: [precheck] runs-on: ubuntu-latest steps: - uses: actions/checkout@v3