diff --git a/.github/workflows/go-build.yml b/.github/workflows/go-build.yml new file mode 100644 index 0000000..28cc054 --- /dev/null +++ b/.github/workflows/go-build.yml @@ -0,0 +1,36 @@ +name: Go build + +# 触发事件 含标签v**g +on: + push: + tags: + - "v**g" + +jobs: + build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + + - name: Setup Go + uses: actions/setup-go@v3 + with: + go-version: 1.19 + + - name: Change go env + run: go env -w GO111MODULE=on + + - name: Build + env: + GOOS: windows + GOARCH: amd64 + working-directory: ./backup4abap_go + run: go build -o backup.exe ./main.go + + - name: Create Release + uses: softprops/action-gh-release@v1 + if: startsWith(github.ref, 'refs/tags/') + with: + body: "压缩代码下载器,用于从已配置 backup4abap_interface 的 ICF 服务通过 HTTP 请求下载代码包到本地,并自动解压。目前仅生成 win64 的运行程序" + files: ./backup4abap_go/backup.exe + token: ${{ secrets.RELEASE_TOKEN }}