-
-
Notifications
You must be signed in to change notification settings - Fork 89
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Export the release URL #97
Comments
It's an interesting idea. I'd be open to it. Implementation hint: |
I have a POC of this sort of working, but I wanted to check in and see if it's the right direction and if you all had any early feedback. I would be happy to put together a PR with these changes if that would be more appropriate for feedback/review etc. Here's a branch in my fork: unstable/v1...compilerla:gh-action-pypi-publish:feat/output-release-url ChangesI modified + TWINE_RESULT=$(
TWINE_USERNAME="$INPUT_USER" \
TWINE_PASSWORD="$INPUT_PASSWORD" \
TWINE_REPOSITORY_URL="$INPUT_REPOSITORY_URL" \
- exec twine upload ${TWINE_EXTRA_ARGS} ${INPUT_PACKAGES_DIR%%/}/*
+ twine upload ${TWINE_EXTRA_ARGS} ${INPUT_PACKAGES_DIR%%/}/*
+ )
+ TWINE_RETURN=$?
+
+ if [[ "$TWINE_RESULT" =~ View\ at:\ *\(https?://[^[:space:]]+\) ]]; then
+ RELEASE_URL="${BASH_REMATCH[1]}"
+ echo "release-url=$RELEASE_URL" >> "$GITHUB_OUTPUT"
+ fi
+
+ exit $TWINE_RETURN
---
name: pypi-publish
description: Upload Python distribution packages to PyPI
inputs:
...
+ outputs:
+ release-url:
+ description: >-
+ The URL on the package index of the newly uploaded package. Summary
Questions
Any other feedback would be greatly appreciated. |
Thanks for posting the patch! I feel like it might be easier once we migrate the entry point script to Python. I've been meaning to stop accumulating more shell scripts for a while :) Answers
|
Hi, it could be cool if you can export the release URL
The text was updated successfully, but these errors were encountered: