From dc25383580bef5f4573f3a609228e7de88bd73b3 Mon Sep 17 00:00:00 2001 From: Nhan Phan Date: Mon, 3 Oct 2022 20:03:09 +0700 Subject: [PATCH] create release build file --- .github/workflows/docker-build.yml | 5 ++--- .github/workflows/release.yml | 30 ++++++++++++++++++++++++++++++ 2 files changed, 32 insertions(+), 3 deletions(-) create mode 100644 .github/workflows/release.yml diff --git a/.github/workflows/docker-build.yml b/.github/workflows/docker-build.yml index 828842d..730c11b 100644 --- a/.github/workflows/docker-build.yml +++ b/.github/workflows/docker-build.yml @@ -1,9 +1,8 @@ name: docker build on: - push: - branches: - - "release" + release: + types: [created] jobs: docker: diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..69cd418 --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,30 @@ +name: release build + +on: + release: + types: [created] + +jobs: + releases-matrix: + name: Release Go Binary + runs-on: ubuntu-latest + strategy: + matrix: + # build and publish in parallel: linux/386, linux/amd64, linux/arm64, windows/386, windows/amd64, darwin/amd64, darwin/arm64 + goos: [linux, windows, darwin] + goarch: ["386", amd64, arm64] + exclude: + - goarch: "386" + goos: darwin + - goarch: arm64 + goos: windows + steps: + - uses: actions/checkout@v3 + - uses: wangyoucao577/go-release-action@v1.32 + with: + github_token: ${{ secrets.GITHUB_TOKEN }} + goos: ${{ matrix.goos }} + goarch: ${{ matrix.goarch }} + goversion: "https://dl.google.com/go/go1.13.1.linux-amd64.tar.gz" + project_path: "./src" + binary_name: "ocean" \ No newline at end of file