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

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


The following commit(s) were added to refs/heads/main by this push:
     new f7e3917  Enhance release CI: add macOS builds, commit-based Docker 
tag, unified release page
f7e3917 is described below

commit f7e39175d348055b67518018ef64d824ace37db5
Author: Wu Sheng <[email protected]>
AuthorDate: Fri Mar 13 11:37:52 2026 +0800

    Enhance release CI: add macOS builds, commit-based Docker tag, unified 
release page
---
 .github/workflows/release.yml | 80 ++++++++++++++++++++++++++++++++++++-------
 1 file changed, 68 insertions(+), 12 deletions(-)

diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml
index a463121..c3c7b54 100644
--- a/.github/workflows/release.yml
+++ b/.github/workflows/release.yml
@@ -31,8 +31,6 @@ on:
 
 env:
   IMAGE: ghcr.io/apache/skywalking-graalvm-distro
-  # Resolve version once: tag-push strips 'v' prefix; manual trigger uses input
-  RELEASE_VERSION: ${{ github.event_name == 'workflow_dispatch' && 
github.event.inputs.version || '' }}
   # Resolve ref: manual trigger uses input commit (or empty for branch HEAD)
   RELEASE_REF: ${{ github.event_name == 'workflow_dispatch' && 
github.event.inputs.commit || '' }}
 
@@ -44,6 +42,7 @@ jobs:
     outputs:
       cache-key: ${{ steps.cache-key.outputs.key }}
       version: ${{ steps.version.outputs.version }}
+      commit-sha: ${{ steps.commit-sha.outputs.sha }}
     steps:
       - name: Checkout with submodules
         uses: actions/checkout@v5
@@ -54,12 +53,16 @@ jobs:
       - name: Resolve version
         id: version
         run: |
-          if [[ -n "${{ env.RELEASE_VERSION }}" ]]; then
-            echo "version=${{ env.RELEASE_VERSION }}" >> "$GITHUB_OUTPUT"
+          if [[ "${{ github.event_name }}" == "workflow_dispatch" ]]; then
+            echo "version=${{ github.event.inputs.version }}" >> 
"$GITHUB_OUTPUT"
           else
             echo "version=${GITHUB_REF_NAME#v}" >> "$GITHUB_OUTPUT"
           fi
 
+      - name: Resolve commit SHA
+        id: commit-sha
+        run: echo "sha=$(git rev-parse --short HEAD)" >> "$GITHUB_OUTPUT"
+
       - name: Set up GraalVM JDK 25
         uses: graalvm/setup-graalvm@v1
         with:
@@ -81,9 +84,9 @@ jobs:
         if: steps.cache.outputs.cache-hit != 'true'
         run: make init-skywalking
 
-  # ── Native image build per architecture ──
-  build-native:
-    name: Native ${{ matrix.arch }}
+  # ── Native image build for Linux (per architecture) ──
+  build-native-linux:
+    name: Native Linux ${{ matrix.arch }}
     runs-on: ${{ matrix.runner }}
     needs: init-skywalking
     strategy:
@@ -171,16 +174,67 @@ jobs:
       - name: Upload native tarball
         uses: actions/upload-artifact@v5
         with:
-          name: native-tarball-${{ matrix.arch }}
+          name: native-tarball-linux-${{ matrix.arch }}
+          path: ${{ steps.rename.outputs.path }}
+          if-no-files-found: error
+          retention-days: 1
+
+  # ── Native image build for macOS (per architecture) ──
+  build-native-macos:
+    name: Native macOS ${{ matrix.arch }}
+    runs-on: ${{ matrix.runner }}
+    needs: init-skywalking
+    strategy:
+      matrix:
+        include:
+          - arch: amd64
+            runner: macos-13
+          - arch: arm64
+            runner: macos-14
+    steps:
+      - name: Checkout with submodules
+        uses: actions/checkout@v5
+        with:
+          ref: ${{ env.RELEASE_REF || github.ref }}
+          submodules: recursive
+
+      - name: Set up GraalVM JDK 25
+        uses: graalvm/setup-graalvm@v1
+        with:
+          java-version: '25'
+          distribution: 'graalvm'
+
+      - name: Restore Maven cache
+        uses: actions/cache/restore@v5
+        with:
+          path: ~/.m2/repository
+          key: ${{ needs.init-skywalking.outputs.cache-key }}
+
+      - name: Build native image
+        run: make native-image
+
+      - name: Rename tarball with arch and version
+        id: rename
+        run: |
+          VERSION="${{ needs.init-skywalking.outputs.version }}"
+          SRC=$(ls 
oap-graalvm-native/target/oap-graalvm-native-*-native-dist.tar.gz)
+          
DEST="oap-graalvm-native/target/apache-skywalking-graalvm-distro-${VERSION}-macos-${{
 matrix.arch }}.tar.gz"
+          cp "${SRC}" "${DEST}"
+          echo "path=${DEST}" >> "$GITHUB_OUTPUT"
+
+      - name: Upload native tarball
+        uses: actions/upload-artifact@v5
+        with:
+          name: native-tarball-macos-${{ matrix.arch }}
           path: ${{ steps.rename.outputs.path }}
           if-no-files-found: error
           retention-days: 1
 
-  # ── Merge per-arch images into multi-arch manifest with version tag ──
+  # ── Merge per-arch images into multi-arch manifest with version + commit 
tags ──
   docker-manifest:
     name: Docker Manifest
     runs-on: ubuntu-latest
-    needs: [init-skywalking, build-native]
+    needs: [init-skywalking, build-native-linux]
     permissions:
       contents: read
       packages: write
@@ -206,8 +260,10 @@ jobs:
         working-directory: /tmp/digests
         run: |
           VERSION="${{ needs.init-skywalking.outputs.version }}"
+          COMMIT_SHA="${{ needs.init-skywalking.outputs.commit-sha }}"
           docker buildx imagetools create \
             -t ${{ env.IMAGE }}:${VERSION} \
+            -t ${{ env.IMAGE }}:${COMMIT_SHA} \
             -t ${{ env.IMAGE }}:latest \
             $(printf '${{ env.IMAGE }}@sha256:%s ' *)
 
@@ -215,7 +271,7 @@ jobs:
   github-release:
     name: GitHub Release
     runs-on: ubuntu-latest
-    needs: [init-skywalking, build-native]
+    needs: [init-skywalking, build-native-linux, build-native-macos]
     permissions:
       contents: write
     steps:
@@ -238,7 +294,7 @@ jobs:
           Build-Time: $(date -u +%Y-%m-%dT%H:%M:%SZ)
           EOF
 
-      - name: Download native tarballs
+      - name: Download all native tarballs
         uses: actions/download-artifact@v5
         with:
           path: /tmp/tarballs

Reply via email to