diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..12eb46e --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,30 @@ +name: goreleaser + +on: + push: + tags: + - 'v*' + +permissions: + contents: write + +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.17 + - name: Run GoReleaser + uses: goreleaser/goreleaser-action@v2 + with: + distribution: goreleaser + version: latest + args: release --rm-dist + env: + GITHUB_TOKEN: ${{ secrets.GORELEASER_GITHUB_TOKEN }} diff --git a/.goreleaser.yml b/.goreleaser.yml index 445a736..0282ccb 100644 --- a/.goreleaser.yml +++ b/.goreleaser.yml @@ -1,6 +1,10 @@ before: hooks: - go mod download + +gomod: + proxy: true + builds: - env: - CGO_ENABLED=0 @@ -10,21 +14,37 @@ builds: - windows goarch: - amd64 + - arm64 ldflags: - -s -w -X main.VERSION={{.Version}} + +universal_binaries: +- replace: false + archives: - replacements: - darwin: mac + darwin: macOS amd64: x64 format_overrides: - goos: windows format: zip - files: - - LICENSE* - - README.md + checksum: name_template: 'checksums.txt' snapshot: name_template: "{{ .Tag }}-next" + +brews: + - name: scmpuff + description: Adds numbered shortcuts for common git commands. + homepage: https://mroth.github.io/scmpuff/ + license: MIT + tap: + owner: mroth + name: homebrew-tap + test: | + ENV["e1"] = "abc" + assert_equal "abc", shell_output("#{bin}/scmpuff expand 1").strip + changelog: skip: true