diff --git a/.github/workflows/default.yml b/.github/workflows/default.yml index 0a179a98..4154f58a 100644 --- a/.github/workflows/default.yml +++ b/.github/workflows/default.yml @@ -65,3 +65,24 @@ jobs: with: command: delete container_id: ${{ steps.create.outputs.container_id }} + release: + name: release + if: startsWith(github.ref, 'refs/tags/') + needs: [lint, unit-tests, acc-tests] + 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.13" + - name: Run GoReleaser + uses: goreleaser/goreleaser-action@v2 + with: + version: latest + args: release --rm-dist + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/.goreleaser.yml b/.goreleaser.yml new file mode 100644 index 00000000..b4983fd5 --- /dev/null +++ b/.goreleaser.yml @@ -0,0 +1,14 @@ +before: + hooks: + - go mod download +builds: +- env: + - CGO_ENABLED=0 + +changelog: + skip: true + +checksum: + name_template: 'checksums.txt' +snapshot: + name_template: "devel"