فهرست منبع

ci(workflow): 添加自动合并main到release分支的工作流

feige996 10 ماه پیش
والد
کامیت
8d953de05a
1فایلهای تغییر یافته به همراه18 افزوده شده و 0 حذف شده
  1. 18 0
      .github/workflows/auto-merge.yml

+ 18 - 0
.github/workflows/auto-merge.yml

@@ -7,6 +7,24 @@ on:
   workflow_dispatch: # 手动触发
 
 jobs:
+  merge-to-release:
+    name: Merge main into release
+    runs-on: ubuntu-latest
+    steps:
+      - name: Checkout repository
+        uses: actions/checkout@v4
+        with:
+          fetch-depth: 0
+          token: ${{ secrets.GH_TOKEN_AUTO_MERGE }}
+
+      - name: Merge main into release
+        run: |
+          git config user.name "GitHub Actions"
+          git config user.email "actions@github.com"
+          git checkout release
+          git merge main --no-ff -m "Auto merge main into release"
+          git push origin release
+
   merge-to-i18n:
     name: Merge main into i18n
     runs-on: ubuntu-latest