From 6b2e5e968357859cb4c157d799464d4553c47342 Mon Sep 17 00:00:00 2001 From: Puneet Behl Date: Sat, 22 Jul 2023 06:40:00 +0530 Subject: [PATCH] Update GitHub Workflow - Update to Java 11 - The `set-output` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/ --- .github/workflows/gradle.yml | 9 +++++---- .github/workflows/release.yml | 6 +++--- 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/.github/workflows/gradle.yml b/.github/workflows/gradle.yml index d842e7315..128b58361 100644 --- a/.github/workflows/gradle.yml +++ b/.github/workflows/gradle.yml @@ -63,7 +63,7 @@ jobs: - name: Publish to repo.grails.org id: publish uses: gradle/gradle-build-action@v2 - if: steps.build.outcome == 'success' && github.event_name == 'push' && matrix.java == '8' + if: steps.build.outcome == 'success' && github.event_name == 'push' && matrix.java == '11' env: GRADLE_ENTERPRISE_ACCESS_KEY: ${{ secrets.GRADLE_ENTERPRISE_ACCESS_KEY }} GRADLE_ENTERPRISE_BUILD_CACHE_NODE_USER: ${{ secrets.GRADLE_ENTERPRISE_BUILD_CACHE_NODE_USER }} @@ -74,7 +74,7 @@ jobs: arguments: -Dorg.gradle.internal.publish.checksums.insecure=true publish - name: Build Docs id: docs - if: steps.build.outcome == 'success' && github.event_name == 'push' && matrix.java == '8' + if: steps.build.outcome == 'success' && github.event_name == 'push' && matrix.java == '11' uses: gradle/gradle-build-action@v2 env: GRADLE_ENTERPRISE_ACCESS_KEY: ${{ secrets.GRADLE_ENTERPRISE_ACCESS_KEY }} @@ -83,7 +83,7 @@ jobs: with: arguments: docs:docs - name: Determine docs target repository - if: steps.docs.outcome == 'success' && github.event_name == 'push' && matrix.java == '8' + if: steps.docs.outcome == 'success' && github.event_name == 'push' && matrix.java == '11' uses: haya14busa/action-cond@v1 id: docs_target with: @@ -91,9 +91,10 @@ jobs: if_true: "grails/grails-data-mapping" if_false: ${{ github.repository }} - name: Publish to Github Pages - if: steps.docs.outcome == 'success' && github.event_name == 'push' && matrix.java == '8' + if: steps.docs.outcome == 'success' && github.event_name == 'push' && matrix.java == '11' uses: micronaut-projects/github-pages-deploy-action@master env: + SKIP_SNAPSHOT: ${{ contains(steps.release_version.outputs.release_version, 'M') }} TARGET_REPOSITORY: ${{ steps.docs_target.outputs.value }} GH_TOKEN: ${{ secrets.GH_TOKEN }} BRANCH: gh-pages diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index a6c921b72..2d72d1e9f 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -24,7 +24,7 @@ jobs: java-version: ${{ matrix.java }} - name: Set the current release version id: release_version - run: echo ::set-output name=release_version::${GITHUB_REF:11} + run: echo "release_version=${GITHUB_REF:11}" >> $GITHUB_OUTPUT - name: Run pre-release uses: micronaut-projects/github-actions/pre-release@master with: @@ -70,9 +70,9 @@ jobs: if_false: ${{ github.repository }} - name: Publish to Github Pages if: success() - uses: micronaut-projects/github-pages-deploy-action@master + uses: micronaut-projects/github-pages-deploy-action@grails env: - BETA: ${{ contains(steps.release_version.outputs.release_version, 'M') || contains(steps.release_version.outputs.release_version, 'RC') }} + SKIP_LATEST: ${{ contains(steps.release_version.outputs.release_version, 'M') }} TARGET_REPOSITORY: ${{ steps.docs_target.outputs.value }} GH_TOKEN: ${{ secrets.GH_TOKEN }} BRANCH: gh-pages