-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(wit): Updates wit package name and adds a version
This also updates to use wkg.lock for the dependencies. Please note that if you need to update dependencies, make sure to use `wash` as it knows how to patch the wasi:logging dep to work properly I'll open a PR after the new wash lands to update how to use the wit ( including the name change) and updates the examples Signed-off-by: Taylor Thomas <[email protected]>
- Loading branch information
1 parent
cccfa52
commit 841995a
Showing
81 changed files
with
958 additions
and
4,413 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
name: Publish WIT package | ||
|
||
on: | ||
push: | ||
tags: | ||
- 'wit-v*' | ||
|
||
permissions: | ||
contents: read | ||
packages: write | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
permissions: | ||
contents: write | ||
steps: | ||
- uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 | ||
- name: Extract tag context | ||
id: ctx | ||
run: | | ||
version=${GITHUB_REF_NAME#wit-v} | ||
echo "version=${version}" >> "$GITHUB_OUTPUT" | ||
echo "tarball=wit-${version}.tar.gz" >> "$GITHUB_OUTPUT" | ||
echo "version is ${version}" | ||
- uses: taiki-e/cache-cargo-install-action@caa6f48d18d42462f9c30df89e2b4f71a42b7c2c | ||
with: | ||
tool: [email protected] | ||
- name: Generate and set wkg config | ||
shell: bash | ||
env: | ||
WKG_OCI_USERNAME: ${{ github.repository_owner }} | ||
WKG_OCI_PASSWORD: ${{ secrets.GITHUB_TOKEN }} | ||
run: | | ||
cat << EOF > wkg-config.toml | ||
[namespace_registries] | ||
wasmcloud = "wasmcloud.com" | ||
wrpc = "bytecodealliance.org" | ||
wasi = "wasi.dev" | ||
[registry."wasmcloud.com".oci] | ||
auth = { username = "${WKG_OCI_USERNAME}", password = "${WKG_OCI_PASSWORD}" } | ||
EOF | ||
echo "WKG_CONFIG_FILE=$(realpath wkg-config.toml)" >> $GITHUB_ENV | ||
- name: Build | ||
run: wkg wit build -o package.wasm | ||
- name: Push version-tagged WebAssembly binary to GHCR | ||
run: wkg publish package.wasm | ||
- name: Package tarball for release | ||
run: | | ||
tar -cvzf ${{ steps.ctx.outputs.tarball }} wit | ||
- name: Release | ||
uses: softprops/action-gh-release@c062e08bd532815e2082a85e87e3ef29c3e6d191 | ||
with: | ||
files: ${{ steps.ctx.outputs.tarball }} | ||
make_latest: "false" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
# TODO: Once the new version of wash is released, we can add this ignore back and remove deps | ||
# wit/deps/ |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Oops, something went wrong.