浏览代码

feat: 添加文档

eryajf 2 年之前
父节点
当前提交
2e4f037143
共有 3 个文件被更改,包括 31 次插入49 次删除
  1. 0 26
      .github/workflows/build-release.yml
  2. 31 1
      .github/workflows/docker-image.yml
  3. 0 22
      .github/workflows/release.yml

+ 0 - 26
.github/workflows/build-release.yml

@@ -1,26 +0,0 @@
-name: build
-
-on:
-  release:
-    types: [created] # 表示在创建新的 Release 时触发
-
-jobs:
-  build-go-binary:
-    runs-on: ubuntu-latest
-    strategy:
-      matrix:
-        goos: [linux, windows, darwin] # 需要打包的系统
-        goarch: [amd64, arm64] # 需要打包的架构
-        exclude: # 排除某些平台和架构
-          - goarch: arm64
-            goos: windows
-    steps:
-      - uses: actions/checkout@v3
-      - uses: wangyoucao577/go-release-action@v1.30
-        with:
-          github_token: ${{ secrets.GITHUB_TOKEN }} # 一个默认的变量,用来实现往 Release 中添加文件
-          goos: ${{ matrix.goos }}
-          goarch: ${{ matrix.goarch }}
-          goversion: 1.18 # 可以指定编译使用的 Golang 版本
-          binary_name: "chatgpt-dingtalk" # 可以指定二进制文件的名称
-          extra_files: LICENSE README.md # 需要包含的额外文件

+ 31 - 1
.github/workflows/docker-image.yml

@@ -58,4 +58,34 @@ jobs:
           # 给清单打上多个标签
           tags: |
             ${{ secrets.DOCKERHUB_USERNAME }}/chatgpt-dingtalk:${{ steps.date.outputs.today }}
-            ${{ secrets.DOCKERHUB_USERNAME }}/chatgpt-dingtalk:latest
+            ${{ secrets.DOCKERHUB_USERNAME }}/chatgpt-dingtalk:latest
+
+  update_release_draft:
+    permissions:
+      contents: write  # for release-drafter/release-drafter to create a github release
+      pull-requests: write  # for release-drafter/release-drafter to add label to PR
+    runs-on: ubuntu-latest
+    steps:
+      - uses: release-drafter/release-drafter@v5
+        env:
+          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
+
+  build-go-binary:
+    runs-on: ubuntu-latest
+    strategy:
+      matrix:
+        goos: [linux, windows, darwin] # 需要打包的系统
+        goarch: [amd64, arm64] # 需要打包的架构
+        exclude: # 排除某些平台和架构
+          - goarch: arm64
+            goos: windows
+    steps:
+      - uses: actions/checkout@v3
+      - uses: wangyoucao577/go-release-action@v1.30
+        with:
+          github_token: ${{ secrets.GITHUB_TOKEN }} # 一个默认的变量,用来实现往 Release 中添加文件
+          goos: ${{ matrix.goos }}
+          goarch: ${{ matrix.goarch }}
+          goversion: 1.18 # 可以指定编译使用的 Golang 版本
+          binary_name: "chatgpt-dingtalk" # 可以指定二进制文件的名称
+          extra_files: LICENSE README.md # 需要包含的额外文件

+ 0 - 22
.github/workflows/release.yml

@@ -1,22 +0,0 @@
-name: Release Drafter
-
-on:
-  push:
-    branches:
-      - main
-  pull_request:
-    types: [opened, reopened, synchronize]
-
-permissions:
-  contents: read
-
-jobs:
-  update_release_draft:
-    permissions:
-      contents: write  # for release-drafter/release-drafter to create a github release
-      pull-requests: write  # for release-drafter/release-drafter to add label to PR
-    runs-on: ubuntu-latest
-    steps:
-      - uses: release-drafter/release-drafter@v5
-        env:
-          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}