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

updated goreleaser.yml and added github action workflow #49

Merged
merged 4 commits into from
Feb 1, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 29 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
on:
push:
tags:
- "*"

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
- run: go install github.com/knadh/stuffbin/stuffbin@latest
- name: Run GoReleaser
uses: goreleaser/goreleaser-action@v2
with:
distribution: goreleaser
version: latest
args: release --rm-dist
env:
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}
44 changes: 31 additions & 13 deletions .goreleaser.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,16 @@
project_name: hopp-cli
release:
github:
owner: hoppscotch
name: hopp-cli
prerelease: auto
draft: false
name_template: "hopp-cli {{.Version}}"
before:
hooks:
- go mod tidy
env:
- 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
- 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
builds:
- env:
- CGO_ENABLED=0
Expand All @@ -12,36 +23,43 @@ builds:
goarch:
- 386
- amd64
- arm64
targets:
- linux_amd64
- linux_arm64
- linux_386
- windows_amd64
- windows_arm64
- windows_386
- darwin_amd64
- darwin_arm64
hooks:
post: make pack-releases
ignore:
- goos: darwin
goarch: 386
archives:
- replacements:
darwin: Darwin
linux: Linux
darwin: macOS
386: i386
linux: linux
amd64: x86_64
checksum:
name_template: 'checksums.txt'
name_template: "checksums.txt"
snapshot:
name_template: '{{ .Tag }}'
name_template: "{{ .Tag }}"
changelog:
sort: asc
filters:
exclude:
- '^docs:'
- '^test:'
release:
github:
owner: hoppscotch
name: hopp-cli
- "^docs:"
- "^test:"
brews:
- name: hopp-cli
github:
owner: athul
name: homebrew-tap
folder: Formula
homepage: 'https://github.com/hoppscotch/hopp-cli'
description: 'CLI for Hoppscotch.io'
homepage: "https://github.com/hoppscotch/hopp-cli"
description: "CLI for Hoppscotch.io"
install: bin.install "hopp-cli"
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -38,4 +38,4 @@ uninstall:

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