Skip to content

Commit f670da8

Browse files
committed
Add release infrastructure for v0.1.0
- Add GitHub Actions workflow for releases with goreleaser - Add goreleaser configuration for cross-platform builds - Add nfpm configuration for DEB/RPM packages - Add snapcraft configuration for Snap packages - Add flatpak manifest for Flatpak builds - Add RELEASE_NOTES.md with comprehensive documentation - Update main.go with version/commit/date build variables Supported platforms: - Linux (amd64, arm64) - binary, deb, rpm, snap, flatpak - macOS (amd64, arm64) - binary - Windows (amd64, arm64) - binary
1 parent 8390735 commit f670da8

File tree

7 files changed

+624
-1
lines changed

7 files changed

+624
-1
lines changed

.github/workflows/release.yml

Lines changed: 173 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,173 @@
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@v5
22+
with:
23+
go-version: '1.23'
24+
25+
- name: Run GoReleaser
26+
uses: goreleaser/goreleaser-action@v6
27+
with:
28+
distribution: goreleaser
29+
version: latest
30+
args: release --clean
31+
env:
32+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
33+
34+
build-deb:
35+
runs-on: ubuntu-latest
36+
needs: goreleaser
37+
steps:
38+
- name: Checkout
39+
uses: actions/checkout@v4
40+
41+
- name: Set up Go
42+
uses: actions/setup-go@v5
43+
with:
44+
go-version: '1.23'
45+
46+
- name: Install nfpm
47+
run: |
48+
go install github.com/goreleaser/nfpm/v2/cmd/nfpm@latest
49+
50+
- name: Build binary
51+
run: |
52+
CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -ldflags="-s -w -X main.version=${{ github.ref_name }}" -o dist/kartoza-geoserver-client_linux_amd64 .
53+
CGO_ENABLED=0 GOOS=linux GOARCH=arm64 go build -ldflags="-s -w -X main.version=${{ github.ref_name }}" -o dist/kartoza-geoserver-client_linux_arm64 .
54+
55+
- name: Build DEB packages
56+
run: |
57+
VERSION="${{ github.ref_name }}"
58+
VERSION="${VERSION#v}"
59+
60+
# Build amd64 deb
61+
ARCH=amd64 VERSION=$VERSION nfpm package --packager deb --target dist/
62+
63+
# Build arm64 deb
64+
ARCH=arm64 VERSION=$VERSION nfpm package --packager deb --target dist/
65+
66+
- name: Upload DEB packages
67+
uses: softprops/action-gh-release@v1
68+
with:
69+
files: dist/*.deb
70+
env:
71+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
72+
73+
build-rpm:
74+
runs-on: ubuntu-latest
75+
needs: goreleaser
76+
steps:
77+
- name: Checkout
78+
uses: actions/checkout@v4
79+
80+
- name: Set up Go
81+
uses: actions/setup-go@v5
82+
with:
83+
go-version: '1.23'
84+
85+
- name: Install nfpm
86+
run: |
87+
go install github.com/goreleaser/nfpm/v2/cmd/nfpm@latest
88+
89+
- name: Build binary
90+
run: |
91+
CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -ldflags="-s -w -X main.version=${{ github.ref_name }}" -o dist/kartoza-geoserver-client_linux_amd64 .
92+
CGO_ENABLED=0 GOOS=linux GOARCH=arm64 go build -ldflags="-s -w -X main.version=${{ github.ref_name }}" -o dist/kartoza-geoserver-client_linux_arm64 .
93+
94+
- name: Build RPM packages
95+
run: |
96+
VERSION="${{ github.ref_name }}"
97+
VERSION="${VERSION#v}"
98+
99+
# Build amd64 rpm
100+
ARCH=amd64 VERSION=$VERSION nfpm package --packager rpm --target dist/
101+
102+
# Build arm64 rpm
103+
ARCH=arm64 VERSION=$VERSION nfpm package --packager rpm --target dist/
104+
105+
- name: Upload RPM packages
106+
uses: softprops/action-gh-release@v1
107+
with:
108+
files: dist/*.rpm
109+
env:
110+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
111+
112+
build-snap:
113+
runs-on: ubuntu-latest
114+
needs: goreleaser
115+
steps:
116+
- name: Checkout
117+
uses: actions/checkout@v4
118+
119+
- name: Set up Go
120+
uses: actions/setup-go@v5
121+
with:
122+
go-version: '1.23'
123+
124+
- name: Build binary for snap
125+
run: |
126+
CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -ldflags="-s -w -X main.version=${{ github.ref_name }}" -o kartoza-geoserver-client .
127+
128+
- name: Install Snapcraft
129+
uses: samber/actions-snapcraft@v2
130+
131+
- name: Build snap
132+
run: |
133+
snapcraft --destructive-mode
134+
135+
- name: Upload snap package
136+
uses: softprops/action-gh-release@v1
137+
with:
138+
files: "*.snap"
139+
env:
140+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
141+
142+
build-flatpak:
143+
runs-on: ubuntu-latest
144+
needs: goreleaser
145+
container:
146+
image: bilelmoussaoui/flatpak-github-actions:freedesktop-23.08
147+
options: --privileged
148+
steps:
149+
- name: Checkout
150+
uses: actions/checkout@v4
151+
152+
- name: Set up Go
153+
uses: actions/setup-go@v5
154+
with:
155+
go-version: '1.23'
156+
157+
- name: Build binary
158+
run: |
159+
CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -ldflags="-s -w -X main.version=${{ github.ref_name }}" -o kartoza-geoserver-client .
160+
161+
- name: Build Flatpak
162+
uses: flatpak/flatpak-github-actions/flatpak-builder@v6
163+
with:
164+
bundle: kartoza-geoserver-client.flatpak
165+
manifest-path: flatpak/com.kartoza.GeoServerClient.yml
166+
cache-key: flatpak-builder-${{ github.sha }}
167+
168+
- name: Upload Flatpak
169+
uses: softprops/action-gh-release@v1
170+
with:
171+
files: kartoza-geoserver-client.flatpak
172+
env:
173+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

.goreleaser.yml

Lines changed: 158 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,158 @@
1+
version: 2
2+
3+
project_name: kartoza-geoserver-client
4+
5+
before:
6+
hooks:
7+
- go mod tidy
8+
9+
builds:
10+
- id: kartoza-geoserver-client
11+
binary: kartoza-geoserver-client
12+
main: .
13+
env:
14+
- CGO_ENABLED=0
15+
goos:
16+
- linux
17+
- darwin
18+
- windows
19+
goarch:
20+
- amd64
21+
- arm64
22+
ldflags:
23+
- -s -w
24+
- -X main.version={{.Version}}
25+
- -X main.commit={{.Commit}}
26+
- -X main.date={{.Date}}
27+
28+
archives:
29+
- id: default
30+
format: tar.gz
31+
name_template: >-
32+
{{ .ProjectName }}_
33+
{{- .Version }}_
34+
{{- .Os }}_
35+
{{- .Arch }}
36+
format_overrides:
37+
- goos: windows
38+
format: zip
39+
files:
40+
- README.md
41+
- LICENSE
42+
- SPECIFICATION.md
43+
44+
checksum:
45+
name_template: 'checksums.txt'
46+
47+
snapshot:
48+
version_template: "{{ incpatch .Version }}-next"
49+
50+
changelog:
51+
sort: asc
52+
filters:
53+
exclude:
54+
- '^docs:'
55+
- '^test:'
56+
- '^chore:'
57+
- Merge pull request
58+
- Merge branch
59+
60+
release:
61+
github:
62+
owner: kartoza
63+
name: kartoza-geoserver-client
64+
draft: false
65+
prerelease: auto
66+
mode: replace
67+
header: |
68+
## Kartoza GeoServer Client {{ .Version }}
69+
70+
A Midnight Commander-style TUI for managing GeoServer instances.
71+
72+
footer: |
73+
---
74+
75+
**Full Changelog**: https://github.com/kartoza/kartoza-geoserver-client/compare/{{ .PreviousTag }}...{{ .Tag }}
76+
77+
### Installation
78+
79+
#### Quick Install (Linux/macOS)
80+
```bash
81+
# Using curl
82+
curl -sSL https://github.com/kartoza/kartoza-geoserver-client/releases/download/{{ .Tag }}/kartoza-geoserver-client_{{ .Version }}_$(uname -s | tr '[:upper:]' '[:lower:]')_$(uname -m | sed 's/x86_64/amd64/').tar.gz | tar xz
83+
84+
# Move to PATH
85+
sudo mv kartoza-geoserver-client /usr/local/bin/
86+
```
87+
88+
#### Using Nix
89+
```bash
90+
nix run github:kartoza/kartoza-geoserver-client
91+
```
92+
93+
#### Package Managers
94+
- **Debian/Ubuntu**: Download `.deb` package below
95+
- **Fedora/RHEL**: Download `.rpm` package below
96+
- **Snap**: `snap install kartoza-geoserver-client` (coming soon)
97+
- **Flatpak**: Download `.flatpak` below
98+
99+
brews:
100+
- name: kartoza-geoserver-client
101+
repository:
102+
owner: kartoza
103+
name: homebrew-tap
104+
token: "{{ .Env.HOMEBREW_TAP_GITHUB_TOKEN }}"
105+
commit_author:
106+
name: Kartoza Bot
107+
email: bot@kartoza.com
108+
directory: Formula
109+
homepage: https://github.com/kartoza/kartoza-geoserver-client
110+
description: "Midnight Commander-style TUI for managing GeoServer instances"
111+
license: MIT
112+
skip_upload: auto
113+
114+
nfpms:
115+
- id: packages
116+
package_name: kartoza-geoserver-client
117+
vendor: Kartoza
118+
homepage: https://github.com/kartoza/kartoza-geoserver-client
119+
maintainer: Tim Sutton <tim@kartoza.com>
120+
description: "A Midnight Commander-style TUI for managing GeoServer instances"
121+
license: MIT
122+
formats:
123+
- deb
124+
- rpm
125+
bindir: /usr/bin
126+
contents:
127+
- src: README.md
128+
dst: /usr/share/doc/kartoza-geoserver-client/README.md
129+
- src: LICENSE
130+
dst: /usr/share/doc/kartoza-geoserver-client/LICENSE
131+
132+
snapcrafts:
133+
- id: snap
134+
name: kartoza-geoserver-client
135+
publish: false
136+
summary: "TUI for managing GeoServer instances"
137+
description: |
138+
A Midnight Commander-style Terminal User Interface (TUI) for managing
139+
GeoServer instances. Browse local geospatial files and upload them to
140+
GeoServer with ease.
141+
142+
Features:
143+
- Dual-panel interface with local files and GeoServer resources
144+
- Multiple GeoServer connection support
145+
- Upload Shapefiles, GeoPackage, GeoTIFF, and styles
146+
- Create, edit, and delete workspaces, stores, and layers
147+
- Interactive layer preview with MapLibre GL
148+
license: MIT
149+
grade: stable
150+
confinement: strict
151+
base: core22
152+
apps:
153+
kartoza-geoserver-client:
154+
command: kartoza-geoserver-client
155+
plugs:
156+
- home
157+
- network
158+
- network-bind

0 commit comments

Comments
 (0)