From 3fc226a309892ac87c4fb63983c7056db90634b1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Se=C3=A1n=20Kavanagh?= <51478689+kavanase@users.noreply.github.com> Date: Wed, 13 Mar 2024 17:25:24 -0400 Subject: [PATCH] Use environment rather than `set-output` commands to avoid GitHub deprecation --- .github/workflows/release.yml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 1eacb79..03a4e06 100755 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -34,31 +34,31 @@ jobs: current_pip_version=$(pip index versions shakenbreak | grep LATEST | awk '{print $NF}') current_repo_version=$(grep version setup.py | awk -F\" '{print $2}' | head -1) if [ "$current_pip_version" != "$current_repo_version" ]; then - echo "::set-output name=version_changed::true" + echo "version_changed=true" >> $GITHUB_ENV else - echo "::set-output name=version_changed::false" + echo "version_changed=false" >> $GITHUB_ENV fi - name: Build packages - if: steps.check_version.outputs.version_changed == 'true' + if: env.version_changed == 'true' run: | python setup.py sdist bdist_wheel - name: Publish - if: steps.check_version.outputs.version_changed == 'true' + if: env.version_changed == 'true' uses: pypa/gh-action-pypi-publish@master with: user: __token__ password: ${{ secrets.TWINE_PASSWORD }} - name: Generate release info - if: steps.check_version.outputs.version_changed == 'true' + if: env.version_changed == 'true' run: | awk 'BEGIN {p = 0} {a = 0 }; /^v\d*.\d*.\d*./ { p += 1; a = 1}; p + a == 1 { print } ' CHANGELOG.rst | sed -e '1,1d' | sed -e '/./,$!d' -e :a -e '/^\n*$/{$d;N;ba' -e '}' > release_info.txt echo "version=$(grep version setup.py | awk -F\" '{print $2}')" >> $GITHUB_ENV - name: Release - if: steps.check_version.outputs.version_changed == 'true' + if: env.version_changed == 'true' uses: actions/create-release@v1 id: create_release env: