From de6b9fdf06e294b13756a1fdffcd10518387ba56 Mon Sep 17 00:00:00 2001 From: Jordan Whited Date: Tue, 24 Nov 2020 14:31:08 -0800 Subject: [PATCH] setup release workflow --- .github/workflows/release.yml | 29 +++++++++++++++++++++++++++++ .goreleaser.yml | 29 +++++++++++++++++++++++++++++ 2 files changed, 58 insertions(+) create mode 100644 .github/workflows/release.yml create mode 100644 .goreleaser.yml diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..e150569 --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,29 @@ +name: release + +on: + push: + tags: + - '*' + +jobs: + release: + runs-on: ubuntu-latest + steps: + - + name: Checkout + uses: actions/checkout@v2 + with: + fetch-depth: 0 + - + name: Set up Go + uses: actions/setup-go@v2 + with: + go-version: 1.15 + - + name: Run GoReleaser + uses: goreleaser/goreleaser-action@v2 + with: + version: latest + args: release --rm-dist + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} \ No newline at end of file diff --git a/.goreleaser.yml b/.goreleaser.yml new file mode 100644 index 0000000..728261e --- /dev/null +++ b/.goreleaser.yml @@ -0,0 +1,29 @@ +before: + hooks: + - go mod download +builds: + - id: coredns + main: ./cmd/coredns/main.go + binary: coredns + env: + - CGO_ENABLED=0 + goos: + - linux + goarch: + - amd64 + - 386 + - arm + - arm64 + + - id: wgsd-client + main: ./cmd/wgsd-client/main.go + binary: wgsd-client + env: + - CGO_ENABLED=0 + goos: + - linux + goarch: + - amd64 + - 386 + - arm + - arm64