Skip to content

Commit 4c9c34a

Browse files
committed
ci: attach compiled .so and .wasm modules to GitHub releases
- Build libvmod_wasm.so (Varnish 9 / Linux amd64) in Docker - Attach all example .wasm modules as release assets - Users can download the pre-built VMOD or portable Wasm filters
1 parent a55855e commit 4c9c34a

1 file changed

Lines changed: 22 additions & 1 deletion

File tree

.github/workflows/release.yml

Lines changed: 22 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,10 +41,31 @@ jobs:
4141
echo "EOF"
4242
} >> "$GITHUB_OUTPUT"
4343
44+
- name: Build release artifacts
45+
run: |
46+
docker build -t vmod-wasm-release .
47+
# Extract .wasm modules
48+
docker run --rm vmod-wasm-release tar -cf - \
49+
tests/wasm/edge_security_filter.wasm \
50+
tests/wasm/proxy_wasm_filter.wasm \
51+
tests/wasm/passthrough.wasm \
52+
tests/wasm/test_module.wasm \
53+
| tar -xf -
54+
# Extract compiled VMOD (.so) for Varnish 9 / Linux amd64
55+
docker run --rm vmod-wasm-release sh -c \
56+
'find /src/.libs -name "libvmod_wasm.so" | head -1 | xargs cat' \
57+
> libvmod_wasm.so
58+
# Package artifacts
59+
mkdir -p dist
60+
cp tests/wasm/*.wasm dist/
61+
cp libvmod_wasm.so "dist/libvmod_wasm-${{ steps.version.outputs.version }}-varnish9-linux-amd64.so"
62+
4463
- name: Create GitHub Release
4564
env:
4665
GH_TOKEN: ${{ github.token }}
4766
run: |
4867
gh release create "$GITHUB_REF_NAME" \
4968
--title "$GITHUB_REF_NAME" \
50-
--notes "${{ steps.changelog.outputs.notes }}"
69+
--notes "${{ steps.changelog.outputs.notes }}" \
70+
dist/*.wasm \
71+
dist/*.so

0 commit comments

Comments
 (0)