Conversation
| publish: | ||
| if: startsWith(github.ref, 'refs/tags/v') | ||
| needs: [build, sdist] | ||
| needs: [build, sdist, wasm] |
There was a problem hiding this comment.
do not release to pypi / cargo if wasm build fals
| - uses: actions/checkout@v7 | ||
| - uses: actions/download-artifact@v8 | ||
| with: | ||
| pattern: wheels-* |
There was a problem hiding this comment.
preventing any wasm file to end up in pypi
| "type": "git", | ||
| "url": "git+https://github.com/AnswerDotAI/mdhtml.git" | ||
| }, | ||
| "publishConfig": { "access": "public" }, |
There was a problem hiding this comment.
required to release public packages
| "repository": { | ||
| "type": "git", | ||
| "url": "git+https://github.com/AnswerDotAI/mdhtml.git" | ||
| }, |
There was a problem hiding this comment.
minor npm warnings fixes
| "wasm-pack": ">=0.15.0" | ||
| }, | ||
| "scripts": { | ||
| "prepack": "node -e \"for (const f of ['README.md', 'LICENSE']) require('node:fs').copyFileSync('../' + f, f)\"", |
There was a problem hiding this comment.
copy root readme & license into wasm folder for releases
|
@kafkasl I tested the github action using Note: to get |
|
my bad I thought 0.1.40 was already released, we can release them manually and then merge my changes as part of the next version, wdyt? |
This PR enables publishing the mdhtml wasm automatically on new GH releases. It follows typrose's pattern. It uses npm trusted publisher settings so we don't have to manually add any token to GH.
NPM requires READM.md & LICENSE.md to be published. Those can't be symlinks so rather than duplicating them I added the
npm prepackcmd which copies them from the root towasmfolder.Currently the trusted publisher in NPM is configured to only allow staging releases. If this is merged, we would still have to manually approve (using 2FA) the release before it's published. Not sure if typrose does the same because I don't have access to those settings.