Skip to content

Commit

Permalink
Fix goreleaser build error (Use goreleaser check instead) (#118)
Browse files Browse the repository at this point in the history
* Use `incpatch .Version` for snapshot

ref. goreleaser/goreleaser#2417

* Simplify checksums.txt

* Ignore windows x arm64

ref. https://goreleaser.com/deprecations/#builds-for-windowsarm64

* Generate zip for windows

* Fix brew errors

Fix the following error

```
Description shouldn't end with a full stop.
```

```
Separate `system` commands into `"#{bin}/nyan", "-v"`
```

ref. toshimaru/homebrew-nyan#2

* Run `goreleaser check` instead of `goreleaser release`

Use goreleaser/goreleaser-action@v2

* Link issue in comment
  • Loading branch information
toshimaru authored Sep 26, 2021
1 parent 305e489 commit 8591c88
Show file tree
Hide file tree
Showing 3 changed files with 33 additions and 21 deletions.
13 changes: 10 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,17 @@ jobs:
run: |
go build -v
go test ./...
- name: Run GoReleaser
uses: goreleaser/goreleaser-action@master
- name: goreleaser check
uses: goreleaser/goreleaser-action@v2
with:
args: release --snapshot --skip-publish --rm-dist
args: check

# cf. https://github.com/toshimaru/nyan/issues/119
# - name: Run GoReleaser
# uses: goreleaser/goreleaser-action@v2
# with:
# args: release --snapshot --skip-publish --rm-dist

# GitHub Actions doesn't support colored output, so comment it out temporarily.
# - name: Colored Output Test
# run: go run main.go -- main.go
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
with:
go-version: '1.16'
- name: Release via goreleaser
uses: goreleaser/goreleaser-action@master
uses: goreleaser/goreleaser-action@v2
with:
args: release
env:
Expand Down
39 changes: 22 additions & 17 deletions .goreleaser.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,18 +8,23 @@ builds:
ignore:
- goos: darwin
goarch: 386
- goos: windows
goarch: arm64
archives:
- name_template: '{{ .ProjectName }}_{{ .Os }}_{{ .Arch }}'
replacements:
darwin: Darwin
linux: Linux
windows: Windows
386: i386
amd64: x86_64
- name_template: '{{ .ProjectName }}_{{ .Os }}_{{ .Arch }}'
replacements:
darwin: Darwin
linux: Linux
windows: Windows
386: i386
amd64: x86_64
format_overrides:
- goos: windows
format: zip
checksum:
name_template: '{{ .ProjectName }}_checksums.txt'
name_template: 'checksums.txt'
snapshot:
name_template: "{{ .Tag }}-next"
name_template: "{{ incpatch .Version }}-next"
changelog:
sort: asc
filters:
Expand All @@ -28,11 +33,11 @@ changelog:
- '^test:'
- Merge pull request
brews:
- tap:
owner: toshimaru
name: homebrew-nyan
description: Colored cat command which supports syntax highlighting.
homepage: https://github.com/toshimaru/nyan
license: MIT
test: |
system "#{bin}/nyan -v"
- tap:
owner: toshimaru
name: homebrew-nyan
description: Colored cat command which supports syntax highlighting
homepage: https://github.com/toshimaru/nyan
license: MIT
test: |
system "#{bin}/nyan", "-v"

0 comments on commit 8591c88

Please sign in to comment.