Comments (8)
This action wraps twine under the hood, which doesn't (currently) have a --dry-run
or equivalent flag. I think it probably makes sense to try and have that kind of behavior upstreamed first so that gh-action-pypi-publish
can re-expose it 🙂
from gh-action-pypi-publish.
I mean that checking the version is something for the underlying tool (Twine) to consider as it'd be something people would want to do locally and on other platforms (like GitLab).
Having it specific to GitHub Action does would mean that each of the other platforms would also need to reinvent the wheel. This project is meant as a thin wrapper, not a place for heavy features.
from gh-action-pypi-publish.
Okay, I will see what is possible using upstream
from gh-action-pypi-publish.
FTR, here's the endpoint that can potentially be used for the version presence: https://warehouse.pypa.io/api-reference/json.html#get--pypi--project_name---version--json.
Although, I don't know if it covers the case of a removed version (the releases are immutable and you cannot re-upload the same version/filename post removal, even if the project was deleted and the ownership changed).
from gh-action-pypi-publish.
Doesn't seem likely to happen since they closed this issue pypa/twine#207
Mostly I want to check:
- Will authentication succeed?
- Does the package version already exist?
It should be noted that the npm publish --dry-run
command does neither of those things so is basically useless as far as I can tell, but whatever.
from gh-action-pypi-publish.
Ah yeah, I remember the rationale there: there's a good argument that twine
(and this workflow) really don't do much at all on their own, so users who want to exercise them are better off running the full workflow against TestPyPI or similar rather than adding a new --dry-run
mode.
However, given that TestPyPI has its own credentials and package namespace, using it to test for authentication/package existence is kind of moot...
from gh-action-pypi-publish.
- Does the package version already exist?
Adding to what William said, this doesn't seem like something that should be specific to only one ecosystem wrapper (GitHub Action).
from gh-action-pypi-publish.
@webknjaz what do you mean?
from gh-action-pypi-publish.
Related Issues (20)
- Make this action play nicely with new gh upload/download artifact actions v4 HOT 7
- [docs] Emphasize the dangers of enabling `skip-existing` in README
- "Only one sdist may be uploaded per release" with skip-existing enabled HOT 2
- Provide a better troubleshooting message when used from a 3P PR
- Provide a full example of a GitHub Actions config, rather than small little pieces HOT 5
- raise BadZipFile("Bad magic number for central directory") HOT 7
- invalid-publisher: valid token, but no corresponding publisher part 2 HOT 16
- Invalid API Token: token with user restriction without a user HOT 5
- Publishing to PyPI fails with HTTPError: 403 Forbidden HOT 4
- `twine check` in action, but passes when dockerfile built locally HOT 4
- option to disable twine progressbar
- HTTPError: 403 Forbidden or invalid-publisher: a valid token is recognized, but no corresponding publisher is found HOT 8
- [TODO] Update the 2FA nudge error message to use present tense
- InvalidDistribution: Unknown distribution format: 'artifact' when not specifying an artifact name HOT 12
- Document permission requirements for private repositories HOT 2
- Token request failed: the index produced an unexpected 503 response HOT 6
- Can't use https://pypi.org/p/<your-pypi-project-name> HOT 1
- Publish package fails: KeyError: 'home-page' HOT 18
- Deprecate the `password` setting in favor of `token`?
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from gh-action-pypi-publish.