From 12afea940d3526890cbff80fd2eb816466167ae8 Mon Sep 17 00:00:00 2001 From: "Mark R. Tuttle" Date: Wed, 21 Dec 2022 15:42:18 -0500 Subject: [PATCH] Replace deprecated set-output in workflows --- .github/workflows/release-brew.yaml | 10 ++++------ .github/workflows/release-pypi.yaml | 7 +++---- 2 files changed, 7 insertions(+), 10 deletions(-) diff --git a/.github/workflows/release-brew.yaml b/.github/workflows/release-brew.yaml index 6e695ca7..848b383c 100644 --- a/.github/workflows/release-brew.yaml +++ b/.github/workflows/release-brew.yaml @@ -107,15 +107,13 @@ jobs: - name: Get Package Path id: get_package_path run: | - bottle_name="$(ls *.tar.gz)" - echo "::set-output name=bottle::$bottle_name" + echo "bottle=$(ls *.tar.gz)" >> $GITHUB_ENV - name: Get File Name id: get_file_name run: | brew install jq - file_name="$(cat *.json | jq -r '."${{ env.TAP }}/${{ env.FORMULA }}".bottle.tags[].filename')" - echo "::set-output name=file_name::$file_name" + echo "file_name=$(jq -r '."${{ env.TAP }}/${{ env.FORMULA }}".bottle.tags[].filename' *.json)" >> $GITHUB_ENV - name: Upload bottles as artifact uses: actions/upload-artifact@main @@ -129,8 +127,8 @@ jobs: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} with: upload_url: ${{ github.event.release.upload_url }} - asset_path: ${{ steps.get_package_path.outputs.bottle }} - asset_name: ${{ steps.get_file_name.outputs.file_name }} + asset_path: ${{ env.bottle }} + asset_name: ${{ env.file_name }} asset_content_type: application/x-gzip update-pr: diff --git a/.github/workflows/release-pypi.yaml b/.github/workflows/release-pypi.yaml index 6422ff5d..28b14f76 100644 --- a/.github/workflows/release-pypi.yaml +++ b/.github/workflows/release-pypi.yaml @@ -16,16 +16,15 @@ jobs: - name: Get Package Name id: get_package_name run: | - package_name="$(ls dist/*.whl | cut -d "/" -f 2)" - echo "::set-output name=package_name::$package_name" + echo "package_name=$(ls dist/*.whl | cut -d "/" -f 2)" >> $GITHUB_ENV - name: Upload release binary uses: actions/upload-release-asset@v1.0.2 env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} with: upload_url: ${{ github.event.release.upload_url }} - asset_path: dist/${{ steps.get_package_name.outputs.package_name }} - asset_name: ${{ steps.get_package_name.outputs.package_name }} + asset_path: dist/${{ env.package_name }} + asset_name: ${{ env.package_name }} asset_content_type: application/zip - name: Upload to PyPi env: