Ensure proper non-dev version string when publishing to PyPI#900
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.
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.
Yes, correct. But I think pushing v0.3.1 to both PyPI and TestPyPI is fine right?
seisman
left a comment
There was a problem hiding this comment.
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') }} |
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 😅 |
|
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.0instead ofv0.3.1.dev0. Also edit the Publish-to-PyPI workflow to only run on GenericMappingTools/pygmt and rename secrets from*_PYPI_PASSWORDto*_PYPI_API_TOKENPublish 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 formatandmake checkto 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