Skip to content

Commit 5cf59bb

Browse files
author
Drew Yang
committed
fix: 🐛 fix release name passing
1 parent c11e422 commit 5cf59bb

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

.github/workflows/post_draft_release_published.yaml

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -68,18 +68,19 @@ jobs:
6868
echo "NEW_VERSION=${{github.event.release.resolved_version}}" >> $GITHUB_ENV
6969
- name: Publish package
7070
id: publish
71+
env:
72+
RELEASE_NAME: ${{ github.event.release.name }}
7173
run: |
72-
RELEASE_NAME="${{ github.event.release.name }}"
7374
export HOST_UID=$(id -u)
7475
if [[ "$RELEASE_NAME" =~ ^Test ]]; then
7576
LATEST_PYPI=$(curl -s https://test.pypi.org/pypi/datajoint/json | jq -r '.info.version')
76-
echo "TEST_PYPI=true" >> $GITHUB_OUTPUT
77+
echo "TEST_PYPI=true" >> $GITHUB_ENV
7778
export TWINE_REPOSITORY="testpypi"
7879
export TWINE_USERNAME=${TWINE_TEST_USERNAME}
7980
export TWINE_PASSWORD=${TWINE_TEST_PASSWORD}
8081
else
8182
LATEST_PYPI=$(curl -s https://pypi.org/pypi/datajoint/json | jq -r '.info.version')
82-
echo "TEST_PYPI=false" >> $GITHUB_OUTPUT
83+
echo "TEST_PYPI=false" >> $GITHUB_ENV
8384
export TWINE_REPOSITORY="pypi"
8485
fi
8586
# Check if the new version is different from the latest on PyPI, avoid re-uploading error
@@ -124,7 +125,7 @@ jobs:
124125
--head ${{ env.BRANCH_NAME }} \
125126
--reviewer dimitri-yatsenko,yambottle,ttngu207
126127
- name: Post release notification to Slack
127-
if: ${{ steps.publish.outputs.TEST_PYPI == 'false' }}
128+
if: ${{ env.TEST_PYPI == 'false' }}
128129
uses: slackapi/[email protected]
129130
with:
130131
webhook: ${{ secrets.SLACK_WEBHOOK_URL }}

0 commit comments

Comments
 (0)