From 41762c3e239db3404c228f411b39fdc95dd2f43d Mon Sep 17 00:00:00 2001 From: Bastian Doetsch Date: Sun, 6 Mar 2022 16:32:34 +0100 Subject: [PATCH] create github action --- .github/workflows/go.yml | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 .github/workflows/go.yml diff --git a/.github/workflows/go.yml b/.github/workflows/go.yml new file mode 100644 index 0000000..decd673 --- /dev/null +++ b/.github/workflows/go.yml @@ -0,0 +1,32 @@ +name: Go + +on: + push: + branches: [ main ] + +jobs: + build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + + - name: Set up Go + uses: actions/setup-go@v2 + with: + go-version: 1.17 + + - name: Test + run: go test -v ./... + + - name: Create release tag + run: | + git tag "v$(git show -s --format=%cd --date=format:%Y%m%d.%H%M%S)" + git push --tags + sudo mv snyk-linux* /usr/local/bin/ + + - name: Release binaries with GoReleaser + uses: goreleaser/goreleaser-action@v2 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + args: release --rm-dist