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

zhongxjian pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/dubbo-kubernetes.git


The following commit(s) were added to refs/heads/master by this push:
     new 6060a0d6 fix workflow v13
6060a0d6 is described below

commit 6060a0d652d8a4de0c9f0cf91bf9ef7848f33c13
Author: mfordjody <[email protected]>
AuthorDate: Sat May 31 20:13:27 2025 +0800

    fix workflow v13
---
 .github/workflows/dubbo-cp-release.yaml | 67 +++++++++++++++++++++++++++------
 1 file changed, 55 insertions(+), 12 deletions(-)

diff --git a/.github/workflows/dubbo-cp-release.yaml 
b/.github/workflows/dubbo-cp-release.yaml
index 447c24dd..67bf8b5f 100644
--- a/.github/workflows/dubbo-cp-release.yaml
+++ b/.github/workflows/dubbo-cp-release.yaml
@@ -26,25 +26,68 @@ on:
   release:
     types: [published]
 
-
 jobs:
   release:
+    name: Release dubbo-cp
     permissions:
       contents: write
-    name: Release Dubbo
     runs-on: ubuntu-latest
-
+    strategy:
+      matrix:
+        goos: [linux, darwin]
+        goarch: [386, amd64, arm64]
+        exclude:
+          - goos: darwin
+            goarch: 386
     steps:
-      - uses: actions/checkout@v4
+      - name: Checkout code
+        uses: actions/checkout@v4
 
-      - name: Setup Docker
-        uses: docker-practice/actions-setup-docker@v1
+      - name: Set up Go
+        uses: actions/setup-go@v5
+        with:
+          go-version-file: go.mod
 
-      - name: Build and push dubbo-cp image
+      - name: Download dependencies
+        run: go mod download
+
+      - name: Build binary
         env:
-          GIT_VERSION: ${GITHUB_REF#refs/tags/dubbo/}
-          REGISTRY_USER_NAME: ${{ secrets.DOCKERHUB_USERNAME }}
-          REGISTRY_PASSWORD: ${{ secrets.DOCKERHUB_TOKEN }}
+          GOOS: ${{ matrix.goos }}
+          GOARCH: ${{ matrix.goarch }}
+          GIT_VERSION: ${{ github.ref_name }}
+        run: |
+          mkdir -p build/
+          make build-dubbo-cp GOOS=${GOOS} GOARCH=${GOARCH} 
GIT_VERSION=${GIT_VERSION}
+          cp README.md LICENSE build/
+          mv bin/dubbo-cp* build/
+
+      - name: Create package
+        id: package
         run: |
-          make image-dubbocp
-          make push-image-dubbocp
\ No newline at end of file
+          VERSION=${GITHUB_REF#refs/tags/}
+          FILENAME=dubbo-cp-${VERSION}-${{ matrix.goos }}-${{ matrix.goarch }}
+          if [ "${{ matrix.goos }}" = "windows" ]; then
+            zip -j ${FILENAME}.zip build/*
+            echo "name=${FILENAME}.zip" >> $GITHUB_OUTPUT
+          else
+            tar -czvf ${FILENAME}.tar.gz -C build .
+            echo "name=${FILENAME}.tar.gz" >> $GITHUB_OUTPUT
+          fi
+
+      - name: Create Release
+        id: create_release
+        uses: actions/create-release@v1
+        with:
+          tag_name: ${{ github.ref_name }}
+          release_name: ${{ github.ref_name }}
+        env:
+          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
+
+      - name: Upload Release Asset
+        uses: actions/upload-release-asset@v1
+        with:
+          upload_url: ${{ steps.create_release.outputs.upload_url }}
+          asset_path: ./${{ steps.package.outputs.name }}
+          asset_name: ${{ steps.package.outputs.name }}
+          asset_content_type: application/octet-stream
\ No newline at end of file

Reply via email to