diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 000000000..fa4b4b117 --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,35 @@ +--- +name: Release +on: + push: + tags: + - "v*" +jobs: + goreleaser: + name: 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.17.x + - name: Setup Snapcraft + run: | + sudo snap install snapcraft --classic + snapcraft login --with - <<<"${SNAP_TOKEN}" + env: + SNAP_TOKEN: ${{ secrets.SNAP_LOGIN }} + SNAPCRAFT_BUILD_ENVIRONMENT: host + - name: Run GoReleaser + uses: goreleaser/goreleaser-action@v2 + with: + version: latest + args: release --rm-dist + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + HOMEBREW_TAP_GITHUB_TOKEN: ${{ secrets.HOMEBREW_TAP_GITHUB_TOKEN }} + diff --git a/.goreleaser.yml b/.goreleaser.yml index e41e83e75..fde445b12 100644 --- a/.goreleaser.yml +++ b/.goreleaser.yml @@ -1,6 +1,5 @@ before: hooks: - - go mod tidy - go generate ./... builds: - env: