From 3bb2ddfaac8f187f2b827164bcf4b27037724ae9 Mon Sep 17 00:00:00 2001 From: WarmUpTill Date: Thu, 3 Nov 2022 20:34:25 +0100 Subject: [PATCH] Update GitHub Actions for set-output deprecation GitHub Actions has deprecated set-output. Replace usages of set-output in stdout with the new syntax to save the output to the new environment variable. See: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/ --- .github/workflows/main.yml | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 30960f24..fcf1dd75 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -92,21 +92,21 @@ jobs: if [[ '${{ secrets.MACOS_SIGNING_APPLICATION_IDENTITY }}' != '' && \ '${{ secrets.MACOS_SIGNING_INSTALLER_IDENTITY }}' != '' && \ '${{ secrets.MACOS_SIGNING_CERT }}' != '' ]] { - print '::set-output name=haveCodesignIdent::true' + print 'haveCodesignIdent=true' >> $GITHUB_OUTPUT } else { - print '::set-output name=haveCodesignIdent::false' + print 'haveCodesignIdent=false' >> $GITHUB_OUTPUT } if [[ '${{ secrets.MACOS_NOTARIZATION_USERNAME }}' != '' && \ '${{ secrets.MACOS_NOTARIZATION_PASSWORD }}' != '' ]] { - print '::set-output name=haveNotarizationUser::true' + print 'haveNotarizationUser=true' >> $GITHUB_OUTPUT } else { - print '::set-output name=haveNotarizationUser::false' + print 'haveNotarizationUser=false' >> $GITHUB_OUTPUT } print '::endgroup::' - print "::set-output name=ccacheDate::$(date +"%Y-%m-%d")" - print "::set-output name=commitHash::${"$(git rev-parse HEAD)"[0,9]}" + print "ccacheDate=$(date +"%Y-%m-%d")" >> $GITHUB_OUTPUT + print "commitHash=${"$(git rev-parse HEAD)"[0,9]}" >> $GITHUB_OUTPUT echo "$PWD/.github/scripts" >> $GITHUB_PATH - name: Restore Compilation Cache @@ -123,9 +123,9 @@ jobs: if: ${{ github.event_name == 'pull_request' }} run: | if [[ -n "$(curl -H "Authorization: Bearer ${{ secrets.GITHUB_TOKEN }}" -s "${{ github.event.pull_request.url }}" | jq -e '.labels[] | select(.name == "Seeking Testers")')" ]] { - print '::set-output name=found::true' + print 'found=true' >> $GITHUB_OUTPUT } else { - print '::set-output name=found::false' + print 'found=false' >> $GITHUB_OUTPUT } - name: Install Apple Developer Certificate @@ -206,8 +206,8 @@ jobs: id: setup run: | ## SETUP ENVIRONMENT SCRIPT - echo "::set-output name=ccacheDate::$(date +"%Y-%m-%d")" - echo "::set-output name=commitHash::$(git rev-parse HEAD | cut -c1-9)" + echo "ccacheDate=$(date +"%Y-%m-%d")" >> $GITHUB_OUTPUT + echo "commitHash=$(git rev-parse HEAD | cut -c1-9)" >> $GITHUB_OUTPUT echo "$PWD/.github/scripts" >> $GITHUB_PATH - name: Restore Compilation Cache @@ -225,9 +225,9 @@ jobs: run: | ## GITHUB LABEL SCRIPT if [[ -n "$(curl -H "Authorization: Bearer ${{ secrets.GITHUB_TOKEN }}" -s "${{ github.event.pull_request.url }}" | jq -e '.labels[] | select(.name == "Seeking Testers")')" ]]; then - echo '::set-output name=found::true' + echo 'found=true' >> $GITHUB_OUTPUT else - echo '::set-output name=found::false' + echo 'found=false' >> $GITHUB_OUTPUT fi - name: Build Plugin @@ -295,7 +295,7 @@ jobs: run: | ## SETUP ENVIRONMENT SCRIPT $CommitHash = (git rev-parse HEAD)[0..8] -join '' - Write-Output "::set-output name=commitHash::${CommitHash}" + "commitHash=${CommitHash}" >> $env:GITHUB_OUTPUT - name: Check for GitHub Labels id: seekingTesters @@ -316,7 +316,7 @@ jobs: $false } - Write-Output "::set-output name=found::$(([string]${LabelFound}).ToLower())" + "found=$(([string]${LabelFound}).ToLower())" >> $env:GITHUB_OUTPUT - name: Build Plugin uses: ./plugin/.github/actions/build-plugin @@ -367,7 +367,7 @@ jobs: id: metadata run: | ## METADATA SCRIPT - echo "::set-output name=version::${GITHUB_REF/refs\/tags\//}" + echo "version=${GITHUB_REF/refs\/tags\//}" >> $GITHUB_OUTPUT - name: Download build artifacts uses: actions/download-artifact@v3