-
Notifications
You must be signed in to change notification settings - Fork 268
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
Upload wasm wheels to github release #128
Conversation
Codecov Report
@@ Coverage Diff @@
## main #128 +/- ##
=======================================
Coverage 97.30% 97.30%
=======================================
Files 40 40
Lines 3900 3900
Branches 29 29
=======================================
Hits 3795 3795
Misses 105 105 Continue to review full report at Codecov.
|
Although wheels distributed on GitHub release are not installable because of CORS in web browser. Edit: made it work with Allow CORS: Access-Control-Allow-Origin Chrome extension. https://pyodide.org/en/latest/console.html import asyncio
import pyodide_js
loop = asyncio.get_event_loop()
pyodide_js.loadPackage('micropip')
pip = pyodide_js.pyimport('micropip')
task = loop.run_until_complete(pip.install('https://github.com/messense/pydantic-core/releases/download/v0.0.0/pydantic_core-0.0.1-cp310-cp310-emscripten_3_1_14_wasm32.whl'))
pip.list()
from pydantic_core import SchemaValidator, ValidationError
SchemaValidator({'type': 'str'}).validate_json('"foobar"') |
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.
Although wheels distributed on GitHub release are not installable because of CORS in web browser.
Should be easy enough to fix with a cloudflare work which just proxies the request and changes the headers, I'll work on that when I get the time.
- name: upload to github release | ||
uses: softprops/action-gh-release@v1 | ||
with: | ||
files: | | ||
wasm/*.whl | ||
prerelease: ${{ contains(github.ref, 'alpha') || contains(github.ref, 'beta') }} |
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.
This seems to creates a new release, we want to add the file to the existing (just created) release.
Looks like this action should do what we want.
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.
That action also create new release if there is no pre-existing one: https://github.com/svenstaro/upload-release-action/blob/fb1eb39e74209484069862c0ad703e495f307650/src/main.ts#L27-L39
I think they behave pretty much the same, but svenstaro/upload-release-action doesn't handle network errors quite well which leads to upload failure sometimes.
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.
humm are you sure softprops/action-gh-release
will add the files to an existing release if it's triggered from that release?
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.
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.
Thanks, I guess we'll find out...
thanks so much. I think we'll do an initial release soon. |
Originally posted by @samuelcolvin in #106 (comment)