Skip to content

Commit b46cf1c

Browse files
committed
chore: switch release channel to varnish9 tags
1 parent c31e757 commit b46cf1c

6 files changed

Lines changed: 147 additions & 44 deletions

File tree

.github/workflows/release.yml

Lines changed: 120 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ name: Release
33
on:
44
push:
55
tags:
6-
- 'v*'
6+
- 'varnish9-v*'
77

88
permissions:
99
contents: write
@@ -38,24 +38,42 @@ jobs:
3838
--load \
3939
-t vmod-wasm-release-${{ matrix.arch }} .
4040
41-
- name: Extract version from tag
41+
- name: Extract release metadata
4242
id: version
43-
run: echo "version=${GITHUB_REF_NAME#v}" >> "$GITHUB_OUTPUT"
43+
shell: bash
44+
run: |
45+
case "$GITHUB_REF_NAME" in
46+
varnish9-v*) version="${GITHUB_REF_NAME#varnish9-v}" ;;
47+
*)
48+
echo "::error::Release tags must match varnish9-vX.Y.Z"
49+
exit 1
50+
;;
51+
esac
52+
53+
if ! [[ "$version" =~ ^[0-9]+\.[0-9]+\.[0-9]+([.-][0-9A-Za-z.-]+)?$ ]]; then
54+
echo "::error::Invalid release version: $version"
55+
exit 1
56+
fi
57+
58+
echo "version=$version" >> "$GITHUB_OUTPUT"
59+
echo "artifact_prefix=vmod-wasm-varnish9-$version" >> "$GITHUB_OUTPUT"
4460
4561
- name: Package binary artifact
4662
env:
4763
VERSION: ${{ steps.version.outputs.version }}
64+
ARTIFACT_PREFIX: ${{ steps.version.outputs.artifact_prefix }}
4865
ARCH: ${{ matrix.arch }}
4966
run: |
5067
mkdir -p dist
5168
docker run --rm --platform linux/${{ matrix.arch }} \
5269
-e VERSION="$VERSION" \
70+
-e ARTIFACT_PREFIX="$ARTIFACT_PREFIX" \
5371
-e ARCH="$ARCH" \
5472
-e WASMTIME_VERSION="${{ env.WASMTIME_VERSION }}" \
5573
-e VARNISH_VERSION="${{ env.VARNISH_VERSION }}" \
5674
-v "$PWD/dist:/dist" \
5775
vmod-wasm-release-${{ matrix.arch }} sh -ceu '
58-
pkg="/tmp/vmod-wasm-${VERSION}-varnish9-linux-${ARCH}"
76+
pkg="/tmp/${ARTIFACT_PREFIX}-linux-${ARCH}"
5977
mkdir -p "$pkg/lib" "$pkg/licenses"
6078
cp /src/src/.libs/libvmod_wasm.so "$pkg/lib/"
6179
cp -a /opt/wasmtime/lib/libwasmtime.so* "$pkg/lib/"
@@ -70,13 +88,13 @@ jobs:
7088
Install both shared libraries into your VMOD/runtime library location or
7189
keep this bundle together and expose the lib directory to varnishd:
7290
73-
export LD_LIBRARY_PATH=/path/to/vmod-wasm-${VERSION}-varnish9-linux-${ARCH}/lib:\$LD_LIBRARY_PATH
91+
export LD_LIBRARY_PATH=/path/to/${ARTIFACT_PREFIX}-linux-${ARCH}/lib:\$LD_LIBRARY_PATH
7492
7593
The VMOD is built and tested against Varnish ${VARNISH_VERSION}. Source
7694
builds remain the authoritative path for custom Varnish installations.
7795
EOF
78-
tar -czf "/dist/vmod-wasm-${VERSION}-varnish9-linux-${ARCH}.tar.gz" \
79-
-C /tmp "vmod-wasm-${VERSION}-varnish9-linux-${ARCH}"
96+
tar -czf "/dist/${ARTIFACT_PREFIX}-linux-${ARCH}.tar.gz" \
97+
-C /tmp "${ARTIFACT_PREFIX}-linux-${ARCH}"
8098
{
8199
echo "arch=${ARCH}"
82100
echo "varnish_version=$(/usr/sbin/varnishd -V 2>&1 | head -n1)"
@@ -89,42 +107,44 @@ jobs:
89107
if: matrix.arch == 'amd64'
90108
env:
91109
VERSION: ${{ steps.version.outputs.version }}
110+
ARTIFACT_PREFIX: ${{ steps.version.outputs.artifact_prefix }}
92111
run: |
93112
docker run --rm --platform linux/${{ matrix.arch }} \
94113
-e VERSION="$VERSION" \
114+
-e ARTIFACT_PREFIX="$ARTIFACT_PREFIX" \
95115
-v "$PWD/dist:/dist" \
96116
vmod-wasm-release-${{ matrix.arch }} sh -ceu '
97117
make dist
98-
cp "vmod-wasm-${VERSION}.tar.gz" "/dist/vmod-wasm-${VERSION}-src.tar.gz"
99-
tmp="/tmp/vmod-wasm-${VERSION}-examples-wasm"
118+
cp "vmod-wasm-${VERSION}.tar.gz" "/dist/${ARTIFACT_PREFIX}-src.tar.gz"
119+
tmp="/tmp/${ARTIFACT_PREFIX}-examples-wasm"
100120
mkdir -p "$tmp"
101121
cp /src/tests/wasm/*.wasm "$tmp/"
102122
cp /src/examples/edge-security-filter/config.json "$tmp/edge-security-filter-config.json"
103-
tar -czf "/dist/vmod-wasm-${VERSION}-examples-wasm.tar.gz" \
104-
-C /tmp "vmod-wasm-${VERSION}-examples-wasm"
123+
tar -czf "/dist/${ARTIFACT_PREFIX}-examples-wasm.tar.gz" \
124+
-C /tmp "${ARTIFACT_PREFIX}-examples-wasm"
105125
'
106126
107127
- name: Smoke test binary bundle
108128
env:
109-
VERSION: ${{ steps.version.outputs.version }}
129+
ARTIFACT_PREFIX: ${{ steps.version.outputs.artifact_prefix }}
110130
ARCH: ${{ matrix.arch }}
111131
run: |
112132
docker run --rm --platform linux/${{ matrix.arch }} \
113-
-e VERSION="$VERSION" \
133+
-e ARTIFACT_PREFIX="$ARTIFACT_PREFIX" \
114134
-e ARCH="$ARCH" \
115135
-v "$PWD/dist:/dist" \
116136
varnish:${{ env.VARNISH_VERSION }} sh -ceu '
137+
pkg="/tmp/pkg/${ARTIFACT_PREFIX}-linux-${ARCH}"
117138
mkdir -p /tmp/pkg
118-
tar -xzf "/dist/vmod-wasm-${VERSION}-varnish9-linux-${ARCH}.tar.gz" -C /tmp/pkg
119-
pkg=$(find /tmp/pkg -maxdepth 1 -type d -name "vmod-wasm-*" | head -n1)
139+
tar -xzf "/dist/${ARTIFACT_PREFIX}-linux-${ARCH}.tar.gz" -C /tmp/pkg
120140
LD_LIBRARY_PATH="$pkg/lib" ldd "$pkg/lib/libvmod_wasm.so" | tee /tmp/ldd.txt
121141
grep "libwasmtime.so.*=>.*$pkg/lib" /tmp/ldd.txt
122142
'
123143
124144
- name: Upload artifacts
125145
uses: actions/upload-artifact@v4
126146
with:
127-
name: release-${{ matrix.arch }}
147+
name: release-varnish9-${{ matrix.arch }}
128148
path: dist/
129149

130150
release:
@@ -136,27 +156,86 @@ jobs:
136156
with:
137157
fetch-depth: 0
138158

139-
- name: Extract version from tag
159+
- name: Extract release metadata
140160
id: version
141-
run: echo "version=${GITHUB_REF_NAME#v}" >> "$GITHUB_OUTPUT"
161+
shell: bash
162+
run: |
163+
case "$GITHUB_REF_NAME" in
164+
varnish9-v*) version="${GITHUB_REF_NAME#varnish9-v}" ;;
165+
*)
166+
echo "::error::Release tags must match varnish9-vX.Y.Z"
167+
exit 1
168+
;;
169+
esac
170+
171+
if ! [[ "$version" =~ ^[0-9]+\.[0-9]+\.[0-9]+([.-][0-9A-Za-z.-]+)?$ ]]; then
172+
echo "::error::Invalid release version: $version"
173+
exit 1
174+
fi
142175
143-
- name: Extract changelog section
144-
id: changelog
176+
echo "version=$version" >> "$GITHUB_OUTPUT"
177+
echo "artifact_prefix=vmod-wasm-varnish9-$version" >> "$GITHUB_OUTPUT"
178+
179+
- name: Build release notes
180+
env:
181+
VERSION: ${{ steps.version.outputs.version }}
182+
ARTIFACT_PREFIX: ${{ steps.version.outputs.artifact_prefix }}
183+
WASMTIME_VERSION: ${{ env.WASMTIME_VERSION }}
184+
VARNISH_VERSION: ${{ env.VARNISH_VERSION }}
145185
run: |
146-
version="${{ steps.version.outputs.version }}"
147-
notes=$(awk -v ver="$version" '
148-
/^## \[/ {
149-
if (found) exit
150-
if (index($0, "[" ver "]")) found=1
151-
next
152-
}
153-
found { print }
154-
' CHANGELOG.md)
155-
{
156-
echo "notes<<EOF"
157-
echo "$notes"
158-
echo "EOF"
159-
} >> "$GITHUB_OUTPUT"
186+
python3 - <<'PY'
187+
import os
188+
189+
version = os.environ["VERSION"]
190+
artifact_prefix = os.environ["ARTIFACT_PREFIX"]
191+
wasmtime_version = os.environ["WASMTIME_VERSION"]
192+
varnish_version = os.environ["VARNISH_VERSION"]
193+
tag = os.environ["GITHUB_REF_NAME"]
194+
195+
lines = open("CHANGELOG.md", encoding="utf-8").read().splitlines()
196+
notes = []
197+
found = False
198+
for line in lines:
199+
if line.startswith("## ["):
200+
if found:
201+
break
202+
found = line.startswith(f"## [{version}]")
203+
continue
204+
if found:
205+
notes.append(line)
206+
207+
changelog = "\n".join(notes).strip() or "See the repository changelog for details."
208+
body = "\n".join([
209+
f"# Varnish 9 / v{version}",
210+
"",
211+
f"This release targets Varnish 9.x and bundles Wasmtime {wasmtime_version}.",
212+
f"Use the `{tag}` release channel for Varnish 9-compatible builds.",
213+
"",
214+
"## Compatibility",
215+
f"- Varnish: 9.x, validated with `varnish:{varnish_version}`",
216+
f"- Wasmtime: {wasmtime_version}, bundled in binary tarballs",
217+
"- Platforms: linux/amd64 and linux/arm64",
218+
"- VCL API: no compatibility break from v4.3.0",
219+
"",
220+
"## Changes",
221+
changelog,
222+
"",
223+
"## Assets",
224+
f"- `{artifact_prefix}-src.tar.gz`",
225+
f"- `{artifact_prefix}-linux-amd64.tar.gz`",
226+
f"- `{artifact_prefix}-linux-arm64.tar.gz`",
227+
f"- `{artifact_prefix}-examples-wasm.tar.gz`",
228+
f"- `manifest-varnish9-{version}.json`",
229+
"- `SHA256SUMS`",
230+
"",
231+
"## Verification",
232+
f"Binary bundles are smoke tested in a fresh `varnish:{varnish_version}` container,",
233+
"including an `ldd` check that `libvmod_wasm.so` resolves the bundled `libwasmtime.so`.",
234+
"`SHA256SUMS` covers all release tarballs and the manifest.",
235+
"",
236+
])
237+
open("release-notes.md", "w", encoding="utf-8").write(body)
238+
PY
160239
161240
- name: Download all artifacts
162241
uses: actions/download-artifact@v4
@@ -190,6 +269,8 @@ jobs:
190269
manifest = {
191270
"name": "vmod-wasm",
192271
"version": version,
272+
"release_channel": "varnish9",
273+
"tag": os.environ["GITHUB_REF_NAME"],
193274
"git_sha": os.environ["GITHUB_SHA"],
194275
"support": {
195276
"varnish": "9.x",
@@ -202,18 +283,19 @@ jobs:
202283
for path in glob.glob("release-dist/*.tar.gz")
203284
),
204285
}
205-
with open(f"release-dist/manifest-{version}.json", "w", encoding="utf-8") as fh:
286+
with open(f"release-dist/manifest-varnish9-{version}.json", "w", encoding="utf-8") as fh:
206287
json.dump(manifest, fh, indent=2)
207288
fh.write("\n")
208289
PY
209290
cd release-dist
210-
sha256sum *.tar.gz "manifest-${VERSION}.json" > SHA256SUMS
291+
sha256sum *.tar.gz "manifest-varnish9-${VERSION}.json" > SHA256SUMS
211292
212293
- name: Create GitHub Release
213294
env:
214295
GH_TOKEN: ${{ github.token }}
296+
VERSION: ${{ steps.version.outputs.version }}
215297
run: |
216298
gh release create "$GITHUB_REF_NAME" \
217-
--title "$GITHUB_REF_NAME" \
218-
--notes "${{ steps.changelog.outputs.notes }}" \
299+
--title "Varnish 9 / v${VERSION}" \
300+
--notes-file release-notes.md \
219301
release-dist/*

CHANGELOG.md

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,24 @@
22

33
All notable changes to vmod-wasm will be documented in this file.
44

5+
## [4.3.1] - 2026-05-23
6+
7+
### Release Channel
8+
- Varnish 9 releases now use `varnish9-vX.Y.Z` tags so compatibility is visible
9+
in the release identity, not only in asset names.
10+
- GitHub release titles now use `Varnish 9 / vX.Y.Z` while the package version
11+
remains standard semantic versioning.
12+
13+
### Changed
14+
- Release artifacts are renamed with the Varnish channel first, for example
15+
`vmod-wasm-varnish9-4.3.1-linux-amd64.tar.gz`.
16+
- Release notes now lead with the Varnish, Wasmtime, platform, and tag contract.
17+
- Release manifests are named `manifest-varnish9-X.Y.Z.json` and include the
18+
release tag and channel metadata.
19+
20+
### Fixed
21+
- Avoids publishing Varnish-specific binaries under a generic `vX.Y.Z` tag line.
22+
523
## [4.3.0] - 2026-05-23
624

725
### Added

README.md

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -119,8 +119,12 @@ make install
119119

120120
### Release Bundles
121121

122-
GitHub releases publish source and convenience binary bundles for Linux
123-
`amd64` and `arm64` on Varnish 9. Binary bundles include `libvmod_wasm.so`,
122+
GitHub releases use Varnish-specific tags such as `varnish9-v4.3.1` so the
123+
supported Varnish ABI line is visible before download. The package version
124+
remains semantic (`4.3.1`), while the release channel identifies Varnish 9.
125+
126+
Release assets include source and convenience binary bundles for Linux `amd64`
127+
and `arm64` on Varnish 9. Binary bundles include `libvmod_wasm.so`,
124128
`libwasmtime.so`, notices, checksums, and an install note. Source builds remain
125129
the authoritative path for custom Varnish installations.
126130

configure.ac

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
AC_PREREQ([2.69])
2-
AC_INIT([vmod-wasm], [4.3.0], [https://github.com/RamazanKara/vmod-wasm/issues])
2+
AC_INIT([vmod-wasm], [4.3.1], [https://github.com/RamazanKara/vmod-wasm/issues])
33
AC_CONFIG_SRCDIR([src/vmod_wasm.vcc])
44
AC_CONFIG_MACRO_DIRS([m4])
55
AC_CONFIG_HEADERS([config.h])

src/vmod_wasm.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
3434
#include "proxy_wasm.h"
3535
#include "vdp_wasm.h"
3636

37-
#define VMOD_WASM_VERSION "4.3.0"
37+
#define VMOD_WASM_VERSION "4.3.1"
3838

3939
/* Global Wasm engine — shared across all VCL instances and threads */
4040
static struct vwasm_engine *vwasm_engine_global = NULL;
@@ -737,4 +737,3 @@ vmod_get_http_pool_stats_json(VRT_CTX)
737737

738738
return (result);
739739
}
740-

tests/basic_load.vtc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,5 +32,5 @@ client c1 {
3232
rxresp
3333
expect resp.status == 200
3434
expect resp.http.X-Wasm-Result == "42"
35-
expect resp.http.X-Wasm-Version == "4.3.0"
35+
expect resp.http.X-Wasm-Version == "4.3.1"
3636
} -run

0 commit comments

Comments
 (0)