Skip to content

Commit

Permalink
Refactored map, added workflow and goreleaser files
Browse files Browse the repository at this point in the history
Signed-off-by: valentine <[email protected]>
  • Loading branch information
valentine committed Jul 6, 2022
1 parent e7b1840 commit 751e094
Show file tree
Hide file tree
Showing 5 changed files with 697 additions and 658 deletions.
33 changes: 33 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: goreleaser

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
-
name: Run GoReleaser
uses: goreleaser/goreleaser-action@v2
with:
distribution: goreleaser
version: ${{ env.GITHUB_REF_NAME }}
args: release --rm-dist
env:
GITHUB_TOKEN: ${{ secrets.PUBLISHER_TOKEN }}
30 changes: 30 additions & 0 deletions .goreleaser.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
builds:
- binary: mediumautopost
goos:
- darwin
- linux
goarch:
- amd64
- arm64
env:
- CGO_ENABLED=0

release:
prerelease: auto

universal_binaries:
- replace: true

brews:
-
name: whattp
homepage: "https://github.com/valxntine/whattp"
tap:
owner: valxntine
name: homebrew-valxntine
commit_author:
name: valxntine
email: [email protected]

checksum:
name_template: 'checksums.txt'
3 changes: 1 addition & 2 deletions cmd/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,7 @@ var rootCmd = &cobra.Command{
Long: `A minimal, offline-ready http response code explorer built with love by valxntine.`,
Args: cobra.ExactArgs(1),
Run: func(cmd *cobra.Command, args []string) {
statuses := codes.NewStatusCodes()
v, ok := statuses[args[0]]
v, ok := codes.StatusCodes[args[0]]
if !ok {
fmt.Fprintln(os.Stdout, center(border, 50))
fmt.Fprintln(os.Stdout, center(blankBorder, 50))
Expand Down
Loading

0 comments on commit 751e094

Please sign in to comment.