Skip to content

Commit 6b6b52a

Browse files
feat: add GitHub Actions workflow for release automation and update README with download instructions
1 parent 65532c2 commit 6b6b52a

3 files changed

Lines changed: 132 additions & 1 deletion

File tree

.github/workflows/release.yml

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
name: Release
2+
3+
on:
4+
push:
5+
tags:
6+
- "v*"
7+
8+
jobs:
9+
release:
10+
name: GoReleaser
11+
runs-on: ubuntu-latest
12+
13+
permissions:
14+
contents: write
15+
packages: write
16+
17+
steps:
18+
- uses: actions/checkout@v4
19+
with:
20+
fetch-depth: 0
21+
22+
- name: Set up Go
23+
uses: actions/setup-go@v5
24+
with:
25+
go-version-file: go.mod
26+
27+
- name: Set up QEMU
28+
uses: docker/setup-qemu-action@v3
29+
30+
- name: Set up Docker Buildx
31+
uses: docker/setup-buildx-action@v3
32+
33+
- name: Log in to GHCR
34+
uses: docker/login-action@v3
35+
with:
36+
registry: ghcr.io
37+
username: ${{ github.actor }}
38+
password: ${{ secrets.GITHUB_TOKEN }}
39+
40+
- name: Run GoReleaser
41+
uses: goreleaser/goreleaser-action@v6
42+
with:
43+
version: "~> v2"
44+
args: release --clean
45+
env:
46+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

.goreleaser.yml

Lines changed: 74 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,74 @@
1+
version: 2
2+
3+
before:
4+
hooks:
5+
- go mod tidy
6+
7+
builds:
8+
- id: netmon
9+
main: ./cmd/netmon
10+
binary: netmon
11+
env:
12+
- CGO_ENABLED=0
13+
goos:
14+
- linux
15+
- darwin
16+
- windows
17+
goarch:
18+
- amd64
19+
- arm64
20+
ldflags:
21+
- -s -w
22+
23+
archives:
24+
- id: netmon
25+
formats:
26+
- tar.gz
27+
format_overrides:
28+
- goos: windows
29+
formats:
30+
- zip
31+
name_template: "{{ .ProjectName }}_{{ .Os }}_{{ .Arch }}"
32+
33+
checksum:
34+
name_template: "checksums.txt"
35+
36+
dockers:
37+
- image_templates:
38+
- ghcr.io/decoded-cipher/netmon:{{ .Tag }}-amd64
39+
use: buildx
40+
build_flag_templates:
41+
- --platform=linux/amd64
42+
- --label=org.opencontainers.image.version={{ .Version }}
43+
- --label=org.opencontainers.image.revision={{ .FullCommit }}
44+
goarch: amd64
45+
46+
- image_templates:
47+
- ghcr.io/decoded-cipher/netmon:{{ .Tag }}-arm64
48+
use: buildx
49+
build_flag_templates:
50+
- --platform=linux/arm64
51+
- --label=org.opencontainers.image.version={{ .Version }}
52+
- --label=org.opencontainers.image.revision={{ .FullCommit }}
53+
goarch: arm64
54+
55+
docker_manifests:
56+
- name_template: ghcr.io/decoded-cipher/netmon:{{ .Tag }}
57+
image_templates:
58+
- ghcr.io/decoded-cipher/netmon:{{ .Tag }}-amd64
59+
- ghcr.io/decoded-cipher/netmon:{{ .Tag }}-arm64
60+
61+
- name_template: ghcr.io/decoded-cipher/netmon:latest
62+
image_templates:
63+
- ghcr.io/decoded-cipher/netmon:{{ .Tag }}-amd64
64+
- ghcr.io/decoded-cipher/netmon:{{ .Tag }}-arm64
65+
66+
changelog:
67+
sort: asc
68+
filters:
69+
exclude:
70+
- "^docs:"
71+
- "^chore:"
72+
- "^ci:"
73+
- Merge pull request
74+
- Merge branch

README.md

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
A lightweight, self-hosted network monitoring dashboard. Tracks latency, jitter, packet loss, DNS resolution times, and bandwidth — displayed in a live web UI with no external services required.
44

5-
![Build](https://github.com/decoded-cipher/netmon/actions/workflows/ci.yml/badge.svg)
5+
![Build](https://github.com/decoded-cipher/netmon/actions/workflows/publish.yml/badge.svg)
66
[![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg)](LICENSE)
77
[![Go](https://img.shields.io/badge/Go-1.21+-00ADD8?logo=go)](https://golang.org)
88

@@ -26,6 +26,17 @@ A lightweight, self-hosted network monitoring dashboard. Tracks latency, jitter,
2626

2727
## Quick Start
2828

29+
### Download a release
30+
31+
Pre-built binaries for Linux, macOS, and Windows (amd64 + arm64) are available on the [Releases](https://github.com/decoded-cipher/netmon/releases) page.
32+
33+
```bash
34+
# example: Linux amd64
35+
curl -LO https://github.com/decoded-cipher/netmon/releases/latest/download/netmon_linux_amd64.tar.gz
36+
tar -xzf netmon_linux_amd64.tar.gz
37+
./netmon
38+
```
39+
2940
### Docker (recommended)
3041

3142
```bash

0 commit comments

Comments
 (0)