Skip to content

Commit

Permalink
Merge pull request #23 from thomastaylor312/feat/add_version_and_publ…
Browse files Browse the repository at this point in the history
…ish_wit

feat(wit): Updates wit package name and adds a version
  • Loading branch information
lxfontes authored Oct 8, 2024
2 parents cccfa52 + 841995a commit d90e203
Show file tree
Hide file tree
Showing 81 changed files with 958 additions and 4,413 deletions.
56 changes: 56 additions & 0 deletions .github/workflows/wit.yaml
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"
2 changes: 2 additions & 0 deletions .gitignore
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/
32 changes: 0 additions & 32 deletions gen/wasi/clocks/monotonic-clock/monotonic-clock.wit.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

35 changes: 0 additions & 35 deletions gen/wasi/clocks/wall-clock/wall-clock.wit.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 0 additions & 2 deletions gen/wasi/filesystem/preopens/preopens.wit.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit d90e203

Please sign in to comment.