Skip to content
This repository was archived by the owner on Jul 14, 2022. It is now read-only.

Commit 55438e7

Browse files
updated goreleaser.yml and added github action workflow (#49)
* Added arm64 support for all OS * feat: add github action for release * update goreleaser.yml * add github action for goreleaser * modified rel path bug in makefile * chore: update workflow fix: update workflow fix: update workflow * fix: uncomment brew config authored-by: @BRO3886 Co-authored-by: Ashique Bava <ashiquebava.ab@gmail.com>
1 parent f3d27cf commit 55438e7

3 files changed

Lines changed: 61 additions & 14 deletions

File tree

.github/workflows/release.yml

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
on:
2+
push:
3+
tags:
4+
- "*"
5+
6+
permissions:
7+
contents: write
8+
9+
jobs:
10+
goreleaser:
11+
runs-on: ubuntu-latest
12+
steps:
13+
- name: Checkout
14+
uses: actions/checkout@v2
15+
with:
16+
fetch-depth: 0
17+
- name: Set up Go
18+
uses: actions/setup-go@v2
19+
with:
20+
go-version: 1.17
21+
- run: go install github.com/knadh/stuffbin/stuffbin@latest
22+
- name: Run GoReleaser
23+
uses: goreleaser/goreleaser-action@v2
24+
with:
25+
distribution: goreleaser
26+
version: latest
27+
args: release --rm-dist
28+
env:
29+
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}

.goreleaser.yml

Lines changed: 31 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,16 @@
1+
project_name: hopp-cli
2+
release:
3+
github:
4+
owner: hoppscotch
5+
name: hopp-cli
6+
prerelease: auto
7+
draft: false
8+
name_template: "hopp-cli {{.Version}}"
9+
before:
10+
hooks:
11+
- go mod tidy
112
env:
2-
- RELEASE_BUILDS=dist/hopp-cli_darwin_amd64/hopp-cli dist/hopp-cli_linux_386/hopp-cli dist/hopp-cli_linux_amd64/hopp-cli dist/hopp-cli_windows_386/hopp-cli.exe dist/hopp-cli_windows_amd64/hopp-cli.exe
13+
- RELEASE_BUILDS=dist/hopp-cli_darwin_amd64/hopp-cli dist/hopp-cli_darwin_arm64/hopp-cli dist/hopp-cli_linux_386/hopp-cli dist/hopp-cli_linux_amd64/hopp-cli dist/hopp-cli_windows_386/hopp-cli.exe dist/hopp-cli_windows_amd64/hopp-cli.exe
314
builds:
415
- env:
516
- CGO_ENABLED=0
@@ -12,36 +23,43 @@ builds:
1223
goarch:
1324
- 386
1425
- amd64
26+
- arm64
27+
targets:
28+
- linux_amd64
29+
- linux_arm64
30+
- linux_386
31+
- windows_amd64
32+
- windows_arm64
33+
- windows_386
34+
- darwin_amd64
35+
- darwin_arm64
1536
hooks:
1637
post: make pack-releases
1738
ignore:
1839
- goos: darwin
1940
goarch: 386
2041
archives:
2142
- replacements:
22-
darwin: Darwin
23-
linux: Linux
43+
darwin: macOS
44+
386: i386
45+
linux: linux
2446
amd64: x86_64
2547
checksum:
26-
name_template: 'checksums.txt'
48+
name_template: "checksums.txt"
2749
snapshot:
28-
name_template: '{{ .Tag }}'
50+
name_template: "{{ .Tag }}"
2951
changelog:
3052
sort: asc
3153
filters:
3254
exclude:
33-
- '^docs:'
34-
- '^test:'
35-
release:
36-
github:
37-
owner: hoppscotch
38-
name: hopp-cli
55+
- "^docs:"
56+
- "^test:"
3957
brews:
4058
- name: hopp-cli
4159
github:
4260
owner: athul
4361
name: homebrew-tap
4462
folder: Formula
45-
homepage: 'https://github.com/hoppscotch/hopp-cli'
46-
description: 'CLI for Hoppscotch.io'
63+
homepage: "https://github.com/hoppscotch/hopp-cli"
64+
description: "CLI for Hoppscotch.io"
4765
install: bin.install "hopp-cli"

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,4 +38,4 @@ uninstall:
3838

3939
.PHONY: pack-releases
4040
pack-releases:
41-
$(foreach var,$(RELEASE_BUILDS),stuffbin -a stuff -in ${var} -out ${var} ${STATIC};)
41+
$(foreach var,$(RELEASE_BUILDS),stuffbin -a stuff -in ${var} -out ./${var} ${STATIC};)

0 commit comments

Comments
 (0)