-
Notifications
You must be signed in to change notification settings - Fork 224
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
Ensure proper non-dev version string when publishing to PyPI #900
Conversation
Please see #901, and let me know if you want to fix it in this PR. |
Disables the Publish to PyPI Github Action on forks of pygmt.
a818172
to
0bee4bb
Compare
- name: Fix up version string | ||
# This step is only necessary for testing purposes and for TestPyPI | ||
- name: Fix up version string for TestPyPI | ||
if: ${{ !startsWith(github.ref, 'refs/tags') }} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If I understand it correctly, when we make a release/tag, this sed command won't run. So, we are pushing the same versions (e.g., v0.3.1
) to both PyPI and TestPyPI, right?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, correct. But I think pushing v0.3.1 to both PyPI and TestPyPI is fine right?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, it looks good.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Things to do before merging:
- Rename the secrets in https://github.com/GenericMappingTools/pygmt/settings/secrets/actions
- Update the PR title
- name: Fix up version string | ||
# This step is only necessary for testing purposes and for TestPyPI | ||
- name: Fix up version string for TestPyPI | ||
if: ${{ !startsWith(github.ref, 'refs/tags') }} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, it looks good.
Ok, generated new tokens and created new secrets for PyPI and TestPyPI. Also deleted the old
See if it looks ok, having trouble describing this PR 😅 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good.
I might trigger a quick test (to TestPyPI) just to make sure things work. Edit: Yep, it works, see https://github.com/GenericMappingTools/pygmt/pull/900/checks?check_run_id=1913789675. |
This reverts commit 0935a64.
…MappingTools#900) * Don't edit setuptools-scm for PyPI releases * Move up comment on 'Fix up version string for TestPyPI' step * Only run the Publish to PyPI workflow on GenericMappingTools/pygmt * Rename secrets from PYPI_PASSWORD to PYPI_API_TOKEN
Description of proposed changes
Ensures that the PyPI release Github Action workflow has a proper version string like
v0.3.0
instead ofv0.3.1.dev0
. Also edit the Publish-to-PyPI workflow to only run on GenericMappingTools/pygmt and rename secrets from*_PYPI_PASSWORD
to*_PYPI_API_TOKEN
Publish Publish Github Action Documentation is at https://github.com/pypa/gh-action-pypi-publish/tree/v1.4.2
Addresses #845 (comment), also fixes #901.
Reminders
make format
andmake check
to make sure the code follows the style guide.doc/api/index.rst
.Slash Commands
You can write slash commands (
/command
) in the first line of a comment to performspecific operations. Supported slash commands are:
/format
: automatically format and lint the code/test-gmt-dev
: run full tests on the latest GMT development version