-
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.
Merge pull request #23 from thomastaylor312/feat/add_version_and_publ…
…ish_wit feat(wit): Updates wit package name and adds a version
- Loading branch information
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.