1111env :
1212 REGISTRY : ghcr.io
1313 IMAGE_NAME : ${{ github.repository }}
14+ NODE_VERSION : ' 18'
1415
1516jobs :
1617 build :
@@ -25,34 +26,29 @@ jobs:
2526 - name : Checkout repository
2627 uses : actions/checkout@v4
2728
28- - name : Set up Go
29- uses : actions/setup-go @v4
29+ - name : Set up Node.js
30+ uses : actions/setup-node @v4
3031 with :
31- go -version : ' 1.21 '
32- cache : true
32+ node -version : ${{ env.NODE_VERSION }}
33+ cache : ' npm '
3334
34- - name : Download dependencies
35- run : go mod download
35+ - name : Install dependencies
36+ run : npm ci
3637
37- - name : Run tests
38- run : |
39- go test -v ./...
40- go vet ./...
38+ - name : Run linting
39+ run : npm run lint
4140
42- - name : Build binary
43- run : |
44- go build -ldflags="-w -s" -o tsflow .
45- chmod +x tsflow
41+ - name : Run type checking
42+ run : npm run type-check
43+
44+ - name : Build application
45+ run : npm run build
4646
47- - name : Build multi-platform binaries
47+ - name : Create build archive
4848 if : github.event_name == 'release'
4949 run : |
50- GOOS=linux GOARCH=amd64 go build -ldflags="-w -s" -o tsflow-linux-amd64 .
51- GOOS=linux GOARCH=arm64 go build -ldflags="-w -s" -o tsflow-linux-arm64 .
52- GOOS=darwin GOARCH=amd64 go build -ldflags="-w -s" -o tsflow-darwin-amd64 .
53- GOOS=darwin GOARCH=arm64 go build -ldflags="-w -s" -o tsflow-darwin-arm64 .
54- GOOS=windows GOARCH=amd64 go build -ldflags="-w -s" -o tsflow-windows-amd64.exe .
55- chmod +x tsflow-*
50+ tar -czf tsflow-build.tar.gz dist/
51+ sha256sum tsflow-build.tar.gz > checksums.txt
5652
5753 - name : Set up Docker Buildx
5854 if : github.event_name != 'pull_request'
@@ -84,43 +80,45 @@ jobs:
8480 labels : |
8581 org.opencontainers.image.source=${{ github.event.repository.html_url }}
8682 org.opencontainers.image.revision=${{ github.sha }}
83+ org.opencontainers.image.title=TSFlow
84+ org.opencontainers.image.description=Tailscale Network Flow Visualizer
8785 cache-from : type=gha
8886 cache-to : type=gha,mode=max
8987
90-
91-
92- - name : Create release archives
93- if : github.event_name == 'release'
94- run : |
95- tar -czf tsflow-linux-amd64.tar.gz tsflow-linux-amd64
96- tar -czf tsflow-linux-arm64.tar.gz tsflow-linux-arm64
97- tar -czf tsflow-darwin-amd64.tar.gz tsflow-darwin-amd64
98- tar -czf tsflow-darwin-arm64.tar.gz tsflow-darwin-arm64
99- zip tsflow-windows-amd64.zip tsflow-windows-amd64.exe
100- sha256sum *.tar.gz *.zip > checksums.txt
101-
10288 - name : Upload release assets
10389 if : github.event_name == 'release'
10490 uses : softprops/action-gh-release@v1
10591 with :
10692 files : |
107- *.tar.gz
108- *.zip
93+ tsflow-build.tar.gz
10994 checksums.txt
11095 body : |
11196 ## TSFlow ${{ github.ref_name }}
11297
98+ A modern web application for visualizing and analyzing network traffic flows within Tailscale networks.
99+
113100 ### Docker Installation
114101 ```bash
115102 docker pull ${{ env.REGISTRY }}/${{ env.IMAGE_NAME_LOWER }}:latest
116- docker run -p 8080:8080 \
117- -e TAILSCALE_ACCESS_TOKEN="your-token" \
103+ docker run -p 3000:3000 -p 3001:3001 \
118104 -e TAILSCALE_TAILNET="your-tailnet" \
105+ -e TAILSCALE_ACCESS_TOKEN="your-access-token" \
119106 ${{ env.REGISTRY }}/${{ env.IMAGE_NAME_LOWER }}:latest
120107 ```
121108
122- ### Binary Installation
123- Download the appropriate binary for your platform from the assets below.
109+ ### Manual Installation
110+ 1. Download the build archive from the assets below
111+ 2. Extract: `tar -xzf tsflow-build.tar.gz`
112+ 3. Serve the `dist/` directory with any static file server
113+ 4. Set up the API server separately using `server.js`
114+
115+ ### Development Setup
116+ ```bash
117+ git clone https://github.com/${{ github.repository }}.git
118+ cd tsflow
119+ npm install
120+ npm run dev:full
121+ ```
124122 draft : false
125123 prerelease : false
126124 env :
0 commit comments