fix(ci): correct wadm WIT tarball structure #4
Workflow file for this run
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
name: wit-wasmcloud-wadm-publish | |
on: | |
push: | |
tags: | |
- "wit-wasmcloud-wadm-v*" | |
permissions: | |
contents: read | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
permissions: | |
contents: write | |
packages: write | |
steps: | |
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | |
with: | |
sparse-checkout: | | |
wit | |
.github | |
- name: Extract tag context | |
id: ctx | |
run: | | |
version=${GITHUB_REF_NAME#wit-wasmcloud-wadm-v} | |
echo "version=${version}" >> "$GITHUB_OUTPUT" | |
echo "tarball=wit-wasmcloud-wadm-${version}.tar.gz" >> "$GITHUB_OUTPUT" | |
echo "version is ${version}" | |
- uses: ./.github/actions/configure-wkg | |
with: | |
oci-username: ${{ github.repository_owner }} | |
oci-password: ${{ secrets.GITHUB_TOKEN }} | |
- name: Build | |
run: wkg wit build --wit-dir wit/wadm -o package.wasm | |
- name: Push version-tagged WebAssembly binary to GHCR | |
run: wkg publish package.wasm | |
- name: Package tarball for release | |
run: | | |
mkdir -p release/wit | |
cp wit/wadm/*.wit release/wit/ | |
tar cvzf ${{ steps.ctx.outputs.tarball }} -C release wit | |
- name: Release | |
uses: softprops/action-gh-release@e7a8f85e1c67a31e6ed99a94b41bd0b71bbee6b8 # v2.0.9 | |
with: | |
files: ${{ steps.ctx.outputs.tarball }} | |
make_latest: "false" |