From 9948ae631f0413b362113c236adb41f02a87e045 Mon Sep 17 00:00:00 2001 From: Josh Bonfield Date: Tue, 7 Feb 2023 18:09:27 +0000 Subject: [PATCH] ci: try this templat --- .github/workflows/build.yaml | 18 ------------------ .github/workflows/release.yaml | 28 ++++++++++++++++++++++++++++ 2 files changed, 28 insertions(+), 18 deletions(-) delete mode 100644 .github/workflows/build.yaml create mode 100644 .github/workflows/release.yaml diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml deleted file mode 100644 index fc98c79..0000000 --- a/.github/workflows/build.yaml +++ /dev/null @@ -1,18 +0,0 @@ -name: build - -on: - release: - types: [created] - -jobs: - release-linux-arm64: - name: release linux/arm64 - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v3 - - uses: wangyoucao577/go-release-action@v1.35 - with: - github_token: ${{ secrets.GITHUB_TOKEN }} - goos: linux - goarch: arm64 - build_flags: cmd/main.go diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml new file mode 100644 index 0000000..b9117f3 --- /dev/null +++ b/.github/workflows/release.yaml @@ -0,0 +1,28 @@ +name: Release binaries + +on: + release: + types: [created] + +jobs: + releases-matrix: + name: Release Go Binary + runs-on: ubuntu-latest + strategy: + matrix: + # build and publish in parallel: linux/amd64 + goos: [linux] + goarch: [amd64, arm64] + steps: + - uses: actions/checkout@v2 + - name: Run tests + run: go test -v -p=1 -timeout=0 ./... + - uses: wangyoucao577/go-release-action@v1.35 + with: + github_token: ${{ secrets.GITHUB_TOKEN }} + goos: ${{ matrix.goos }} + goarch: ${{ matrix.goarch }} + project_path: "./cmd/main.go" + binary_name: "go-watering" + ldflags: "-s -w" + extra_files: LICENSE.md README.md \ No newline at end of file