Comments (12)
You were right. When downloading, name
causes the action to download everything in that folder. If not given, the entire folder is downloaded, along with any other folder that may exist there.
from gh-action-pypi-publish.
Checking dist/artifact: ERROR InvalidDistribution: Unknown distribution format: 'artifact'
From the above error message, it seems using actions/download-artifact@v3
changed your package name to artifact
under the dist/
folder. so I guess you can try to fix the package name format from the download step of path
, e.g. change path: dist/
to path: dist/mypackage.whl
from gh-action-pypi-publish.
If I name it python-package-distributions
it works. So where's the difference between artifact
and python-package-distributions
. One name works, the other fails.
from gh-action-pypi-publish.
@danielniccoli v3 of the action allows uploading/downloading artifacts without supplying the name input. In that case, their internals default to using the artifact
name. That's not something related to this action, really.
from gh-action-pypi-publish.
This is likely because when you download w/o a name, GH combines all the artifacts related to the workflow into one and that behavior is known to differ.
from gh-action-pypi-publish.
@danielniccoli v3 of the action allows uploading/downloading artifacts without supplying the name input. In that case, their internals default to using the
artifact
name. That's not something related to this action, really.
- Yes, I know that.
- I know that, too. But that's not the point of this issue.
from gh-action-pypi-publish.
This is likely because when you download w/o a name, GH combines all the artifacts related to the workflow into one and that behavior is known to differ.
My build process only creates one artifact.
The content of both archives artifact
and python-package-distributions
are identical. If it works for the archive python-package-distributions
, it must work for artifact
. So why does one throw an error? This still sounds like a bug with this action.
If you need logs, let me know how to collect them and I will help with that.
from gh-action-pypi-publish.
So why does one throw an error?
Because artifact
is a subfolder and GitHub's official action puts stuff in a nested folder structure. So if you want to use that, you'll have to adjust the packages-dir:
input which defaults to dist/
to something else, like dist/artifact/
, perhaps. The action will not traverse your folder structure to guess what you want to upload, it's your responsibility to set up a proper folder structure before calling this action: https://github.com/marketplace/actions/pypi-publish#non-goals.
from gh-action-pypi-publish.
InvalidDistribution: Unknown distribution format: 'artifact'
FYI we don't output this error, it's the underlying call to Twine that does.
from gh-action-pypi-publish.
If you need logs, let me know how to collect them and I will help with that.
Try injecting a call to tree dist/
or ls -alhR dist/
right after invoking the download action to see the difference. You should see that the structure GitHub's action produces is nested in one of the cases.
from gh-action-pypi-publish.
This still sounds like a bug with this action.
It's not, because we don't do anything with GitHub artifacts at all. We only work with files on disk that you put there. And we only call twine and a few other helpers but don't do anything advanced like looking into deeply nested directories.
from gh-action-pypi-publish.
Perhaps, it might make sense to add an explanatory warning message if a folder called artifact/
exists. But it seems like too much special-casing to maintain. If someone else gets confused by this, I'll consider implementing such a check.
from gh-action-pypi-publish.
Related Issues (20)
- 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
- Feature request: add `--dry-run` equivalent parameter HOT 8
- `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
- 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`? HOT 2
- ERROR `long_description` has syntax errors in markup and would not be rendered on PyPI. No content rendered from RST source. HOT 2
- Upload 500 when using v1.8.10 HOT 4
- `HTTPError: 400 ... has an unsupported platform tag` cancels uploads
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.