Create build.yml

This commit is contained in:
Vincent Young 2022-10-20 01:10:20 +08:00 committed by GitHub
parent 9d6eebd691
commit 548237e176
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

37
.github/workflows/build.yml vendored Normal file
View File

@ -0,0 +1,37 @@
on:
push:
pull_request:
name: Build Release
jobs:
Build:
if: startsWith(github.ref, 'refs/tags/v')
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-go@v2
with:
go-version: "1.18"
- run: bash .cross_compile.sh
- name: Release
uses: softprops/action-gh-release@v1
with:
draft: false
files: |
dist/deeplx_darwin_amd64
dist/deeplx_darwin_arm64
dist/deeplx_linux_386
dist/deeplx_linux_amd64
dist/deeplx_linux_arm64
dist/deeplx_linux_armv7
dist/deeplx_linux_mips
dist/deeplx_openbsd_amd64
dist/deeplx_openbsd_arm64
dist/deeplx_freebsd_amd64
dist/deeplx_freebsd_arm64
env:
GITHUB_TOKEN: ${{ secrets.GT_Token }}