diff --git a/.github/workflows/go.yml b/.github/workflows/go.yml index 55a54d2..301885e 100644 --- a/.github/workflows/go.yml +++ b/.github/workflows/go.yml @@ -3,9 +3,11 @@ name: Go on: push: branches: ["main"] + tags: ["v*"] # 添加这行来监听标签推送 pull_request: branches: ["main"] + jobs: build: runs-on: ubuntu-20.04 @@ -41,5 +43,6 @@ jobs: uses: softprops/action-gh-release@v1 with: files: output/go_webdav_client* # 将下载的二进制文件发布到 release 中 + tag_name: ${{ github.ref_name }} # 使用触发的标签名称 env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # 使用 GitHub 的 token 来授权发布 \ No newline at end of file