Skip to content

Commit edbe5ba

Browse files
committed
prep for release
1 parent d4730a7 commit edbe5ba

File tree

2 files changed

+26
-8
lines changed

2 files changed

+26
-8
lines changed

.github/workflows/draft-release.yml

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,15 @@ jobs:
1010
contents: write
1111
runs-on: ubuntu-latest
1212
steps:
13+
- uses: actions/checkout@v4
14+
- id: get-version
15+
run: |
16+
version=$(cargo metadata --format-version=1 --no-deps | jq -r '.packages[0].version')
17+
echo "version=$version" >> "$GITHUB_OUTPUT"
1318
- uses: actions/download-artifact@v4
1419
with:
1520
name: out
16-
- run: gh release create '?' --draft out/*
21+
- run: gh release create "$TAG" --draft out/*
1722
env:
1823
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
19-
GH_REPO: ${{ github.repository }}
24+
TAG: v${{ steps.get-version.outputs.version }}

README.md

Lines changed: 19 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -38,15 +38,15 @@ console.log(greetMany(["Alan Turing", "Ada Lovelace"]));
3838
The easiest way to get started is by using one of these wrapper libraries that
3939
already have all of the WASM host imports resolved.
4040

41-
For JavaScript users, you can use npm, [pnpm], [Yarn], or your other favorite npm package manager to install
42-
[`hello-world-rust-wasm-component`] from npm.
41+
For JavaScript users, you can use npm, [pnpm], [Yarn], or your other favorite
42+
npm package manager to install [`hello-world-rust-wasm-component`] from npm.
4343

4444
```sh
4545
npm install hello-world-rust-wasm-component
4646
```
4747

48-
If you prefer to customize the Javascript ↔ WASM component bindings, you can use
49-
[bytecodealliance/jco] to generate your own bindings.
48+
If you prefer to customize the Javascript ↔ WASM component bindings, you can
49+
use [bytecodealliance/jco] to generate your own bindings.
5050

5151
<!-- For Python users, you can use pip, [Poetry], or another PyPI package manager to
5252
install [`hello-world-rust-wasm-component`] from PyPI.
@@ -82,9 +82,21 @@ For language-specific binding documentation, check out
8282
./build.sh --release
8383
```
8484

85-
ℹ You'll need [`wasm-tools`] installed which you can get via `cargo install wasm-tools`.
85+
ℹ You'll need [`wasm-tools`] installed which you can get via
86+
`cargo install wasm-tools`.
8687

87-
The `wasi_snapshot_preview1.reactor.wasm` is the adapter module to shim the component API over top of the existing WASI API. Keep it updated from [bytecodealliance/wasmtime releases]. Since this is a library we want the "reactor" version.
88+
The `wasi_snapshot_preview1.reactor.wasm` is the adapter module to shim the
89+
component API over top of the existing WASI API. Keep it updated from
90+
[bytecodealliance/wasmtime releases]. Since this is a library we want the
91+
"reactor" version.
92+
93+
🚚 To create a new release, don't use the GitHub UI directly; use the [draft
94+
release] GitHub Actions workflow to create the initial draft release with the
95+
compiled WASM artifact. Then you can edit that release and publish it as normal.
96+
Make sure the `version` field is correct in `Cargo.toml` before drafting the
97+
release; it's used to choose the `v${version}` tag name for the release. Also
98+
try not to change the artifacts attached to the draft release; they were
99+
generated by GitHub Actions.
88100

89101
<!-- prettier-ignore -->
90102
✅ JavaScript: [jcbhmr/hello-world-rust-wasm-component/hello-world-rust-wasm-component.js](https://github.com/jcbhmr/hello-world-rust-wasm-component/tree/main/hello-world-rust-wasm-component.js) \
@@ -99,4 +111,5 @@ The `wasi_snapshot_preview1.reactor.wasm` is the adapter module to shim the comp
99111
[wasm component]: https://github.com/WebAssembly/component-model
100112
[`wasm-tools`]: https://github.com/bytecodealliance/wasm-tools
101113
[bytecodealliance/wasmtime releases]: https://github.com/bytecodealliance/wasmtime/releases
114+
[draft release]: https://github.com/jcbhmr/hello-world-wasm-component/actions/workflows/draft-release.yml
102115
<!-- prettier-ignore-end -->

0 commit comments

Comments
 (0)