Skip to content

Commit ef104b5

Browse files
committed
goreleaser
1 parent 5c25353 commit ef104b5

File tree

3 files changed

+65
-0
lines changed

3 files changed

+65
-0
lines changed

.github/workflows/release-binary.yml

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
name: 🎉 Release Binary
2+
on:
3+
create:
4+
tags:
5+
- v*
6+
workflow_dispatch:
7+
8+
jobs:
9+
release:
10+
runs-on: ubuntu-latest
11+
steps:
12+
- name: "Check out code"
13+
uses: actions/checkout@v3
14+
with:
15+
fetch-depth: 0
16+
17+
- name: "Set up Go"
18+
uses: actions/setup-go@v2
19+
with:
20+
go-version: 1.17
21+
22+
- name: "Create release on GitHub"
23+
uses: goreleaser/goreleaser-action@v2
24+
with:
25+
args: "release --rm-dist"
26+
version: latest
27+
workdir: .
28+
env:
29+
GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}"

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
.idea
22
logs/**
3+
logs.txt

.goreleaser.yml

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
before:
2+
hooks:
3+
- go mod tidy
4+
5+
builds:
6+
- env:
7+
- CGO_ENABLED=0
8+
goos:
9+
- windows
10+
- linux
11+
- darwin
12+
goarch:
13+
- amd64
14+
- 386
15+
- arm
16+
- arm64
17+
18+
ignore:
19+
- goos: darwin
20+
goarch: '386'
21+
- goos: windows
22+
goarch: 'arm'
23+
- goos: windows
24+
goarch: 'arm64'
25+
26+
binary: '{{ .ProjectName }}'
27+
main: cmd/httpx/httpx.go
28+
29+
archives:
30+
- format: zip
31+
replacements:
32+
darwin: macOS
33+
34+
checksum:
35+
algorithm: sha256

0 commit comments

Comments
 (0)