diff --git a/.github/workflows/coverage.yml b/.github/workflows/coverage.yml index d7b50b6e8..9cbdcff98 100644 --- a/.github/workflows/coverage.yml +++ b/.github/workflows/coverage.yml @@ -30,7 +30,8 @@ jobs: steps: - name: Get current date as package key id: pkg_key - run: echo "::set-output name=key::$(date +'%W')" + run: echo "key=$(date +'%W')" >> $GITHUB_OUTPUT + shell: bash - name: Checkout repository uses: actions/checkout@v3 @@ -68,8 +69,14 @@ jobs: # Fetch xmake dephash - name: Retrieve dependencies hash - id: dep_hash - run: echo "::set-output name=hash::$(xmake l utils.ci.packageskey)" + if: runner.os == 'Linux' + id: dep_hash_linux + run: echo "hash=$(xmake l utils.ci.packageskey)" >> $GITHUB_OUTPUT + + - name: Retrieve dependencies hash + if: runner.os == 'Windows' + id: dep_hash_windows + run: echo "hash=$(xmake l utils.ci.packageskey)" | Out-File -FilePath $env:GITHUB_OUTPUT -Encoding utf8 -Append # Cache xmake dependencies - name: Retrieve cached xmake dependencies (Linux) @@ -77,15 +84,14 @@ jobs: uses: actions/cache@v3 with: path: ${{ env.XMAKE_GLOBALDIR }}/.xmake/packages - key: Linux-${{ matrix.config.arch }}-coverage-${{ steps.dep_hash.outputs.hash }}-W${{ steps.pkg_key.outputs.key }} + key: Linux-${{ matrix.config.arch }}-coverage-${{ steps.dep_hash_linux.outputs.hash }}-W${{ steps.pkg_key.outputs.key }} - # Cache xmake dependencies - name: Retrieve cached xmake dependencies (Windows) if: runner.os == 'Windows' uses: actions/cache@v3 with: path: ${{ env.XMAKE_GLOBALDIR }}\.xmake\packages - key: MSVC-${{ matrix.config.arch }}-coverage-${{ steps.dep_hash.outputs.hash }}-W${{ steps.pkg_key.outputs.key }} + key: MSVC-${{ matrix.config.arch }}-coverage-${{ steps.dep_hash_windows.outputs.hash }}-W${{ steps.pkg_key.outputs.key }} # Setup compilation mode and install project dependencies - name: Configure xmake and install dependencies diff --git a/.github/workflows/linux-build.yml b/.github/workflows/linux-build.yml index 89acba2fe..6fcea3677 100644 --- a/.github/workflows/linux-build.yml +++ b/.github/workflows/linux-build.yml @@ -30,7 +30,7 @@ jobs: steps: - name: Get current date as package key id: pkg_key - run: echo "::set-output name=key::$(date +'%W')" + run: echo "key=$(date +'%W')" >> $GITHUB_OUTPUT - name: Checkout repository uses: actions/checkout@v3 @@ -58,7 +58,7 @@ jobs: # Fetch xmake dephash - name: Retrieve dependencies hash id: dep_hash - run: echo "::set-output name=hash::$(xmake l utils.ci.packageskey)" + run: echo "hash=$(xmake l utils.ci.packageskey)" >> $GITHUB_OUTPUT # Cache xmake dependencies - name: Retrieve cached xmake dependencies diff --git a/.github/workflows/macos-build.yml b/.github/workflows/macos-build.yml index 2e5100015..acce7cab9 100644 --- a/.github/workflows/macos-build.yml +++ b/.github/workflows/macos-build.yml @@ -29,7 +29,7 @@ jobs: steps: - name: Get current date as package key id: pkg_key - run: echo "::set-output name=key::$(date +'%W')" + run: echo "key=$(date +'%W')" >> $GITHUB_OUTPUT - name: Checkout repository uses: actions/checkout@v3 @@ -51,7 +51,7 @@ jobs: # Fetch xmake dephash - name: Retrieve dependencies hash id: dep_hash - run: echo "::set-output name=hash::$(xmake l utils.ci.packageskey)" + run: echo "hash=$(xmake l utils.ci.packageskey)" >> $GITHUB_OUTPUT # Cache xmake dependencies - name: Retrieve cached xmake dependencies diff --git a/.github/workflows/msys2-build.yml b/.github/workflows/msys2-build.yml index 2479a1c8c..71cf1eaee 100644 --- a/.github/workflows/msys2-build.yml +++ b/.github/workflows/msys2-build.yml @@ -35,7 +35,7 @@ jobs: - name: Get current date as package key id: pkg_key shell: bash - run: echo "::set-output name=key::$(date +'%W')" + run: echo "key=$(date +'%W')" >> $GITHUB_OUTPUT - name: Checkout repository uses: actions/checkout@v3 @@ -81,7 +81,7 @@ jobs: # Fetch xmake dephash - name: Retrieve dependencies hash id: dep_hash - run: echo "::set-output name=hash::$(xmake l utils.ci.packageskey)" + run: echo "hash=$(xmake l utils.ci.packageskey)" >> $GITHUB_OUTPUT # Cache xmake dependencies - name: Retrieve cached xmake dependencies diff --git a/.github/workflows/windows-build.yml b/.github/workflows/windows-build.yml index 2c45d8db9..ac0cc5060 100644 --- a/.github/workflows/windows-build.yml +++ b/.github/workflows/windows-build.yml @@ -29,7 +29,8 @@ jobs: steps: - name: Get current date as package key id: pkg_key - run: echo "::set-output name=key::$(date +'%W')" + run: echo "key=$(date +'%W')" >> $GITHUB_OUTPUT + shell: bash - name: Checkout repository uses: actions/checkout@v3 @@ -51,7 +52,7 @@ jobs: # Fetch xmake dephash - name: Retrieve dependencies hash id: dep_hash - run: echo "::set-output name=hash::$(xmake l utils.ci.packageskey)" + run: echo "hash=$(xmake l utils.ci.packageskey)" | Out-File -FilePath $env:GITHUB_OUTPUT -Encoding utf8 -Append # Cache xmake dependencies - name: Retrieve cached xmake dependencies