Skip to content

fix yml

fix yml #16

Workflow file for this run

name: Go
on:
push:
branches: ["main"]
tags: ["v*"] # 添加这行来监听标签推送
pull_request:
branches: ["main"]
jobs:
build:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v4
- name: Set up Go
uses: actions/setup-go@v4
with:
go-version: "1.23"
- name: Build
run: go build -v -o output/go_webdav_client ./...
- name: Build arm64
run: export GOOS=linux; export GOARCH=arm64; go build -v -o output/go_webdav_client_arm64 ./...
- name: Upload build artifact
uses: actions/upload-artifact@v3
with:
name: go_webdav_client-build
path: output/go_webdav_client* # 指定要上传的编译文件路径
release:
needs: build
runs-on: ubuntu-latest
steps:
- name: Download artifact
uses: actions/download-artifact@v3
with:
name: go_webdav_client-build
- name: Create GitHub Release
uses: softprops/action-gh-release@v1
with:
files: go_webdav_client* # 将下载的二进制文件发布到 release 中
tag_name: ${{ github.ref_name }} # 使用触发的标签名称
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # 使用 GitHub 的 token 来授权发布