Skip to content

Commit 07725ba

Browse files
dextercodoclaude
andcommitted
Add GoReleaser release workflow for cross-platform binaries
- Add .goreleaser.yaml with builds for linux/darwin/windows on amd64/arm64 - Add release.yml workflow triggered on version tags (v*) - Update CHANGELOG.md with release workflow entry 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <[email protected]>
1 parent 65ad5ea commit 07725ba

File tree

3 files changed

+91
-0
lines changed

3 files changed

+91
-0
lines changed

.github/workflows/release.yml

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

.goreleaser.yaml

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
# yaml-language-server: $schema=https://goreleaser.com/static/schema.json
2+
version: 2
3+
4+
project_name: sshto
5+
6+
before:
7+
hooks:
8+
- go mod tidy
9+
10+
builds:
11+
- id: sshto
12+
binary: sshto
13+
main: .
14+
env:
15+
- CGO_ENABLED=0
16+
goos:
17+
- linux
18+
- darwin
19+
- windows
20+
goarch:
21+
- amd64
22+
- arm64
23+
ldflags:
24+
- -s -w
25+
26+
archives:
27+
- id: default
28+
format: tar.gz
29+
name_template: "{{ .ProjectName }}_{{ .Version }}_{{ .Os }}_{{ .Arch }}"
30+
format_overrides:
31+
- goos: windows
32+
format: zip
33+
34+
checksum:
35+
name_template: "checksums.txt"
36+
37+
changelog:
38+
sort: asc
39+
filters:
40+
exclude:
41+
- "^docs:"
42+
- "^test:"
43+
- "^chore:"
44+
- Merge pull request
45+
- Merge branch
46+
47+
release:
48+
github:
49+
owner: codoworks
50+
name: sshto
51+
draft: false
52+
prerelease: auto
53+
name_template: "v{{ .Version }}"

CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,11 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
77

88
## [Unreleased]
99

10+
### Added
11+
12+
- GoReleaser configuration for cross-platform binary releases
13+
- GitHub Actions release workflow triggered on version tags
14+
1015
## [0.1.0] - 2024-12-14
1116

1217
### Added

0 commit comments

Comments
 (0)