Skip to content

Commit e54f958

Browse files
committed
Trying release automation CI/CD
1 parent 114c8e9 commit e54f958

File tree

4 files changed

+123
-4
lines changed

4 files changed

+123
-4
lines changed

.github/workflows/ci.yml

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
name: CI
2+
3+
# Disabled until tests are implemented
4+
# Uncomment the lines below when tests are ready
5+
# on:
6+
# push:
7+
# branches: [ main ]
8+
# pull_request:
9+
# branches: [ main ]
10+
11+
# Alternative: you can also disable by commenting out the entire 'on' section
12+
# and using a manual trigger only when you want to test:
13+
on:
14+
workflow_dispatch: # Allows manual triggering from GitHub UI
15+
16+
jobs:
17+
test:
18+
runs-on: ubuntu-latest
19+
steps:
20+
- name: Checkout
21+
uses: actions/checkout@v4
22+
23+
- name: Set up Go
24+
uses: actions/setup-go@v4
25+
with:
26+
go-version: '1.24'
27+
28+
- name: Run tests
29+
run: go test ./...
30+
31+
- name: Build CLI
32+
run: go build ./cmd/bunnysign
33+
34+
- name: Test CLI runs
35+
run: |
36+
./bunnysign "CI Test Message"

.github/workflows/release.yml

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
name: Release
2+
3+
on:
4+
push:
5+
tags:
6+
- 'v*'
7+
8+
permissions:
9+
contents: write
10+
11+
jobs:
12+
goreleaser:
13+
runs-on: ubuntu-latest
14+
steps:
15+
- name: Checkout
16+
uses: actions/checkout@v4
17+
with:
18+
fetch-depth: 0
19+
20+
- name: Set up Go
21+
uses: actions/setup-go@v4
22+
with:
23+
go-version: '1.24'
24+
25+
- name: Run GoReleaser
26+
uses: goreleaser/goreleaser-action@v5
27+
with:
28+
distribution: goreleaser
29+
version: latest
30+
args: release --clean
31+
env:
32+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

.goreleaser.yaml

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
project_name: bunnysign
2+
3+
before:
4+
hooks:
5+
- go mod tidy
6+
7+
builds:
8+
- env:
9+
- CGO_ENABLED=0
10+
main: ./cmd/bunnysign
11+
binary: bunnysign
12+
goos:
13+
- linux
14+
- windows
15+
- darwin
16+
goarch:
17+
- amd64
18+
- arm64
19+
ignore:
20+
- goos: windows
21+
goarch: arm64
22+
23+
archives:
24+
- format: tar.gz
25+
name_template: "{{ .ProjectName }}_{{ .Version }}_{{ .Os }}_{{ .Arch }}"
26+
format_overrides:
27+
- goos: windows
28+
format: zip
29+
30+
checksum:
31+
name_template: 'checksums.txt'
32+
33+
snapshot:
34+
name_template: "{{ incpatch .Version }}-next"
35+
36+
changelog:
37+
sort: asc
38+
filters:
39+
exclude:
40+
- '^docs:'
41+
- '^test:'

README.md

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -27,16 +27,26 @@ This Go package lets you display animated messages with an adorable bunny holdin
2727

2828
## Installation
2929

30-
### As a Library
30+
### Using go install (Recommended)
3131

3232
```bash
33-
go get github.com/fsgreco/go-bunny-sign
33+
go install github.com/fsgreco/go-bunny-sign/cmd/bunnysign@latest
3434
```
3535

36-
### As a CLI Tool
36+
### Download Pre-built Binaries
37+
38+
Download the latest binary for your platform from [GitHub Releases](https://github.com/fsgreco/go-bunny-sign/releases):
39+
40+
- **Windows**: `bunnysign_v1.0.0_windows_amd64.zip`
41+
- **macOS**: `bunnysign_v1.0.0_darwin_amd64.tar.gz` (Intel) or `bunnysign_v1.0.0_darwin_arm64.tar.gz` (Apple Silicon)
42+
- **Linux**: `bunnysign_v1.0.0_linux_amd64.tar.gz` or `bunnysign_v1.0.0_linux_arm64.tar.gz`
43+
44+
Extract the binary and add it to your PATH.
45+
46+
### As a Library
3747

3848
```bash
39-
go install github.com/fsgreco/go-bunny-sign/cmd/bunnysign@latest
49+
go get github.com/fsgreco/go-bunny-sign
4050
```
4151

4252
## Usage

0 commit comments

Comments
 (0)