Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
For #355.
In #352 (comment), @goanpeca kindly offered to help setting this up with GitHub Actions. I wanted to get something ready so we can get a release out soon, and I've used Travis for this before, but I'd still be very happy to change this over to GHA when ready. And this lays some useful groundwork for that.
This will deploy to TestPyPI on non-tagged merges to master, and to PyPI for tags.
It will be done only for this
ultrajson/ultrajson
repo, and only on a single CI job (arbitrarily, Python 3.8 on AMD64).I created API tokens on Test PyPI and production PyPI, and encrypted the values using
travis encrypt
, so they're not available for pull requests from forks.TestPyPI (and PyPI) only allows one upload per version number. To let it upload test versions for all merges to master without having to manually edit the version number, this uses
setuptools_scm
to move the version number out of a hardcoded file.For tagged commits, it uses that tag version number. For commits in between tags, it increments the version based on the number of commits from the last tag. For example, right now:
Because the version number is actually needed in a header file for the C build, it will export it to an untracked file.
This generates an sdist and a bdist_wheel. I'm not sure exactly what sort of wheel this will create, I suggest we have a look at TestPyPI when this is merged, and we can decide whether to keep it, or remove it pending #219.