From f18bf2e5de24963867db505b5637eb159f8ea9cb Mon Sep 17 00:00:00 2001 From: Kirill Isakov Date: Fri, 25 Jun 2021 16:50:14 +0600 Subject: [PATCH] Add goreleaser & publish snapshots to GitHub --- .github/workflows/release.yml | 30 ++++++++++++++++++++++++++++++ gateway/.gitignore | 2 +- gateway/.goreleaser.yml | 18 ++++++++++++++++++ gateway/build.sh | 10 ---------- 4 files changed, 49 insertions(+), 11 deletions(-) create mode 100644 .github/workflows/release.yml create mode 100644 gateway/.goreleaser.yml delete mode 100755 gateway/build.sh diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..dccfd08 --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,30 @@ +name: goreleaser + +on: + push: + tags: + - "*" + +jobs: + goreleaser: + 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.16 + + - name: run goreleaser + uses: goreleaser/goreleaser-action@v2 + with: + workdir: gateway + distribution: goreleaser + version: latest + args: release --rm-dist + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/gateway/.gitignore b/gateway/.gitignore index 41d1086..1100d06 100644 --- a/gateway/.gitignore +++ b/gateway/.gitignore @@ -1,2 +1,2 @@ airmon - +dist/ diff --git a/gateway/.goreleaser.yml b/gateway/.goreleaser.yml new file mode 100644 index 0000000..17bc0b5 --- /dev/null +++ b/gateway/.goreleaser.yml @@ -0,0 +1,18 @@ +project_name: airmon-gateway +before: + hooks: + - go mod tidy +builds: + - goos: + - linux + goarch: + - amd64 + - arm64 +checksum: + name_template: "checksums.txt" +changelog: + sort: asc + filters: + exclude: + - "^docs:" + - "^test:" diff --git a/gateway/build.sh b/gateway/build.sh deleted file mode 100755 index def2d51..0000000 --- a/gateway/build.sh +++ /dev/null @@ -1,10 +0,0 @@ -#!/usr/bin/bash - -set -euo pipefail - -cd "$(dirname "$0")" - -rm --force airmon - -podman run --rm -it -v .:/app golang:buster bash -c 'cd /app && go build .' -