This is an automated email from the ASF dual-hosted git repository.

qiuxiafan pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/skywalking-mcp.git


The following commit(s) were added to refs/heads/main by this push:
     new 7ca9e5c  build: fix release scripts and add release documentation (#34)
7ca9e5c is described below

commit 7ca9e5cacfae602d3729bd810767be44599f3a0b
Author: Fine0830 <[email protected]>
AuthorDate: Tue Mar 17 16:12:48 2026 +0800

    build: fix release scripts and add release documentation (#34)
---
 .gitignore              |   1 +
 RELEASE.md              | 171 ++++++++++++++++++++++++++++++++++++++++++++++++
 scripts/push-release.sh |  26 ++++++--
 scripts/release.sh      |   2 +
 4 files changed, 193 insertions(+), 7 deletions(-)

diff --git a/.gitignore b/.gitignore
index 36d6006..8b58594 100644
--- a/.gitignore
+++ b/.gitignore
@@ -36,6 +36,7 @@
 .vscode/
 /bin/
 .DS_Store
+.env
 coverage.txt
 target/
 inspector-config.json
diff --git a/RELEASE.md b/RELEASE.md
new file mode 100644
index 0000000..525ce25
--- /dev/null
+++ b/RELEASE.md
@@ -0,0 +1,171 @@
+# How to Release Apache SkyWalking MCP
+
+This document describes the full release process for Apache SkyWalking MCP, 
following the [Apache Software Foundation release 
policy](https://www.apache.org/legal/release-policy.html).
+
+## Prerequisites
+
+- Apache committer account with SVN write access to `dist.apache.org`
+- GPG key registered in the [Apache KEYS 
file](https://dist.apache.org/repos/dist/release/skywalking/KEYS)
+- Tools installed: `git`, `gpg`, `shasum`, `svn`, `make`
+
+### Verify your GPG key is ready
+
+```bash
+gpg --list-secret-keys --keyid-format LONG
+```
+
+If no key exists, generate one using your Apache email address:
+
+```bash
+gpg --full-generate-key
+gpg --keyserver keys.openpgp.org --send-keys <YOUR_KEY_ID>
+```
+
+Then append your public key to the [Apache KEYS 
file](https://dist.apache.org/repos/dist/release/skywalking/KEYS) via SVN.
+
+---
+
+## Step 1 — Update CHANGES.md
+
+Add a section for the new version to `CHANGES.md` and commit to `main`.
+
+---
+
+## Step 2 — Create and push a Git tag
+
+```bash
+export VERSION=0.1.0-rc0   # no "v" prefix; used throughout all steps below
+git tag v${VERSION}
+git push origin v${VERSION}
+```
+
+---
+
+## Step 3 — Build and sign the artifacts
+
+`release.sh` resolves the version from the **latest tag reachable in the 
repo** (via `git describe --tags`), not from the `VERSION` env var. To ensure 
the artifacts are stamped with the intended version, use one of these 
approaches:
+
+**Option A (recommended): set `RELEASE_VERSION` explicitly**
+
+```bash
+RELEASE_VERSION=${VERSION} make release-assembly
+```
+
+**Option B: ensure the new tag is the latest in the repo**
+
+If `v${VERSION}` is already the most recent tag, `make release-assembly` picks 
it up automatically without any env override.
+
+> If another newer tag exists in the repo, Option A is required to avoid 
building artifacts with the wrong version.
+
+This runs three steps in sequence:
+1. `release-source` — creates `build/skywalking-mcp-${VERSION}-src.tgz`
+2. `release-binary` — creates `build/skywalking-mcp-${VERSION}.tgz`
+3. `release-sign` — creates signatures and checksums for both tarballs:
+    - `build/skywalking-mcp-${VERSION}.tgz.asc` and 
`build/skywalking-mcp-${VERSION}.tgz.sha512`
+    - `build/skywalking-mcp-${VERSION}-src.tgz.asc` and 
`build/skywalking-mcp-${VERSION}-src.tgz.sha512`
+
+---
+
+## Step 4 — Upload to Apache dist/dev and send vote email
+
+```bash
+make release-push-candidate
+```
+
+This script:
+1. SVN-checks out `https://dist.apache.org/repos/dist/dev/skywalking/`
+2. Copies the tarballs, signature, and checksum into 
`skywalking/mcp/${VERSION}/`
+3. Commits to SVN
+4. Prints a vote email template to stdout
+
+Copy the printed email and send it to `[email protected]`.
+
+---
+
+## Step 5 — Community vote
+
+The vote must remain open for **at least 72 hours**. It requires:
+- At least **3 PMC member +1 votes**
+- No binding **-1 votes**
+
+Refer to the [SkyWalking vote check 
guide](https://github.com/apache/skywalking/blob/master/docs/en/guides/How-to-release.md#vote-check)
 for how to verify a release candidate.
+
+---
+
+## Step 6 — Promote the release (after vote passes)
+
+Move the artifacts from `dist/dev` to `dist/release`:
+
+```bash
+svn mv \
+  https://dist.apache.org/repos/dist/dev/skywalking/mcp/${VERSION} \
+  https://dist.apache.org/repos/dist/release/skywalking/mcp/${VERSION} \
+  -m "Release Apache SkyWalking MCP ${VERSION}"
+```
+
+Remove the previous release from `dist/release` to keep only the latest:
+
+```bash
+svn rm \
+  https://dist.apache.org/repos/dist/release/skywalking/mcp/<PREVIOUS_VERSION> 
\
+  -m "Remove old Apache SkyWalking MCP release"
+```
+
+---
+
+## Step 7 — Create the GitHub Release
+
+Go to **GitHub → Releases → Create a release**, select tag `v${VERSION}`, and 
publish it.
+
+This automatically triggers two CI workflows:
+- **publish-docker** — pushes `apache/skywalking-mcp:v${VERSION}` to Docker Hub
+- **publish-binaries** — builds 4 platform binaries (linux/darwin × 
amd64/arm64) and attaches them as release assets
+
+---
+
+## Step 8 — Announce the release
+
+Send an announcement email to `[email protected]` and 
`[email protected]`:
+
+```
+Subject: [ANNOUNCE] Apache SkyWalking MCP {VERSION} Released
+
+Hi the SkyWalking Community:
+
+This is a call for vote to release Apache SkyWalking MCP version $VERSION.
+
+Release notes:
+
+ * https://github.com/apache/skywalking-mcp/blob/v$VERSION/CHANGES.md
+
+Release Candidate:
+
+ * https://dist.apache.org/repos/dist/dev/skywalking/mcp/$VERSION
+ * sha512 checksums
+   - $(cat ${PRODUCT_NAME}.tgz.sha512)
+
+Release Tag :
+
+ * (Git Tag) $TAG_NAME
+
+Release Commit Hash :
+
+ * https://github.com/apache/skywalking-mcp/tree/${RELEASE_COMMIT}
+
+Keys to verify the Release Candidate :
+
+ * https://dist.apache.org/repos/dist/release/skywalking/KEYS
+
+Guide to build the release from source :
+
+ * https://github.com/apache/skywalking-mcp/blob/v$VERSION/README.md
+
+Voting will start now and will remain open for at least 72 hours, all PMC 
members are required to give their votes.
+
+[ ] +1 Release this package.
+[ ] +0 No opinion.
+[ ] -1 Do not release this package because....
+
+Thanks.
+
+[1] 
https://github.com/apache/skywalking/blob/master/docs/en/guides/How-to-release.md#vote-check
diff --git a/scripts/push-release.sh b/scripts/push-release.sh
index 15c9b70..7a00c71 100755
--- a/scripts/push-release.sh
+++ b/scripts/push-release.sh
@@ -33,6 +33,13 @@ SCRIPTDIR=$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )
 ROOTDIR=${SCRIPTDIR}/..
 BUILDDIR=${ROOTDIR}/build
 
+if ! git -C "${ROOTDIR}" show-ref --tags --verify "refs/tags/${TAG_NAME}" 
>/dev/null 2>&1; then
+  echo "Error: Git tag '${TAG_NAME}' not found. Create and push the tag 
first:" >&2
+  echo "  git tag ${TAG_NAME} && git push origin ${TAG_NAME}" >&2
+  exit 1
+fi
+RELEASE_COMMIT=$(git -C "${ROOTDIR}" rev-list -n 1 "${TAG_NAME}")
+
 pushd ${BUILDDIR}
 trap 'popd' EXIT
 
@@ -40,12 +47,17 @@ rm -rf skywalking
 
 svn co https://dist.apache.org/repos/dist/dev/skywalking/
 mkdir -p skywalking/mcp/"$VERSION"
-cp ${PRODUCT_NAME}-*.tgz skywalking/mcp/"$VERSION"
-cp ${PRODUCT_NAME}-*.tgz.asc skywalking/mcp/"$VERSION"
-cp ${PRODUCT_NAME}-*.tgz.sha512 skywalking/mcp/"$VERSION"
-
-cd skywalking/mcp && svn add "$VERSION" && svn commit -m "Draft Apache 
SkyWalking MCP release $VERSION"
-cd "$VERSION"
+BINARY_TGZ="${PRODUCT_NAME}.tgz"
+SRC_TGZ="${PRODUCT_NAME}-src.tgz"
+cp "${BINARY_TGZ}" skywalking/mcp/"$VERSION"
+cp "${BINARY_TGZ}.asc" skywalking/mcp/"$VERSION"
+cp "${BINARY_TGZ}.sha512" skywalking/mcp/"$VERSION"
+cp "${SRC_TGZ}" skywalking/mcp/"$VERSION"
+cp "${SRC_TGZ}.asc" skywalking/mcp/"$VERSION"
+cp "${SRC_TGZ}.sha512" skywalking/mcp/"$VERSION"
+
+cd skywalking && svn add --parents mcp/"$VERSION" && svn commit -m "Draft 
Apache SkyWalking MCP release $VERSION"
+cd mcp/"$VERSION"
 
 cat << EOF
 =========================================================================
@@ -72,7 +84,7 @@ Release Tag :
 
 Release Commit Hash :
 
- * https://github.com/apache/skywalking-mcp/tree/$(git rev-list -n 1 
"$TAG_NAME")
+ * https://github.com/apache/skywalking-mcp/tree/${RELEASE_COMMIT}
 
 Keys to verify the Release Candidate :
 
diff --git a/scripts/release.sh b/scripts/release.sh
index f26bf2e..9edb6f6 100755
--- a/scripts/release.sh
+++ b/scripts/release.sh
@@ -130,6 +130,8 @@ sign(){
     pushd "${BUILDDIR}" >/dev/null
     trap 'popd >/dev/null' EXIT
 
+    gpg --batch --yes --armor --detach-sig 
"skywalking-mcp-${RELEASE_VERSION}-src.tgz"
+    shasum -a 512 "skywalking-mcp-${RELEASE_VERSION}-src.tgz" > 
"skywalking-mcp-${RELEASE_VERSION}-src.tgz.sha512"
     gpg --batch --yes --armor --detach-sig 
"skywalking-mcp-${RELEASE_VERSION}.tgz"
     shasum -a 512 "skywalking-mcp-${RELEASE_VERSION}.tgz" > 
"skywalking-mcp-${RELEASE_VERSION}.tgz.sha512"
 }

Reply via email to