瀏覽代碼

Merge pull request #52 from nameczz/main

fix(pencil): Add merge and release ci yml
nameczz 4 年之前
父節點
當前提交
1670b461b7
共有 2 個文件被更改,包括 21 次插入18 次删除
  1. 19 0
      .github/workflows/merge.yml
  2. 2 18
      .github/workflows/release.yml

+ 19 - 0
.github/workflows/merge.yml

@@ -0,0 +1,19 @@
+on:
+  push:
+    branches:
+      - main
+
+jobs:
+  publish:
+    runs-on: ubuntu-latest
+    steps:
+      - uses: actions/checkout@v2
+      - name: Setup Node.js
+        uses: actions/setup-node@v1
+        with:
+          node-version: 12
+
+      - name: Semantic release
+        env:
+          GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}
+        run: npx semantic-release

+ 2 - 18
.github/workflows/release.yml

@@ -1,22 +1,11 @@
 on:
-  push:
-    branches:
-      - main
-  # pull_request:
-  #   branches:
-  #     - main
-  #   types: [closed]
+  release:
+    types: [published]
 
 jobs:
   publish:
     runs-on: ubuntu-latest
     steps:
-      - uses: actions/checkout@v2
-      - name: Setup Node.js
-        uses: actions/setup-node@v1
-        with:
-          node-version: 12
-
       - name: Login to DockerHub
         uses: docker/login-action@v1
         with:
@@ -34,8 +23,3 @@ jobs:
 
       - name: Docker Push lastest
         run: docker push milvusdb/milvus-insight
-
-      - name: Semantic release
-        env:
-          GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}
-        run: npx semantic-release