Skip to content

Commit 2d0ac2d

Browse files
Simplify installation instructions and add release workflow
- Rewrite installation section with copy-paste commands - Add platform-specific instructions (macOS, Linux, Windows) - Add "Don't have Go?" section with install commands - Add GitHub Actions workflow to build release binaries for all platforms
1 parent 91fea1b commit 2d0ac2d

2 files changed

Lines changed: 115 additions & 4 deletions

File tree

.github/workflows/release.yml

Lines changed: 78 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,78 @@
1+
name: Release
2+
3+
on:
4+
push:
5+
tags:
6+
- 'v*'
7+
8+
permissions:
9+
contents: write
10+
11+
jobs:
12+
build:
13+
runs-on: ubuntu-latest
14+
strategy:
15+
matrix:
16+
include:
17+
- goos: linux
18+
goarch: amd64
19+
suffix: linux-amd64
20+
- goos: linux
21+
goarch: arm64
22+
suffix: linux-arm64
23+
- goos: darwin
24+
goarch: amd64
25+
suffix: darwin-amd64
26+
- goos: darwin
27+
goarch: arm64
28+
suffix: darwin-arm64
29+
- goos: windows
30+
goarch: amd64
31+
suffix: windows-amd64
32+
ext: .exe
33+
34+
steps:
35+
- uses: actions/checkout@v4
36+
37+
- name: Set up Go
38+
uses: actions/setup-go@v5
39+
with:
40+
go-version: '1.21'
41+
42+
- name: Build
43+
env:
44+
GOOS: ${{ matrix.goos }}
45+
GOARCH: ${{ matrix.goarch }}
46+
run: |
47+
go build -ldflags="-s -w" -o tlsanalyzer${{ matrix.ext }} ./cmd/tlsanalyzer
48+
49+
- name: Create archive
50+
run: |
51+
if [ "${{ matrix.goos }}" = "windows" ]; then
52+
zip tlsanalyzer-${{ matrix.suffix }}.zip tlsanalyzer${{ matrix.ext }}
53+
else
54+
tar -czvf tlsanalyzer-${{ matrix.suffix }}.tar.gz tlsanalyzer${{ matrix.ext }}
55+
fi
56+
57+
- name: Upload artifact
58+
uses: actions/upload-artifact@v4
59+
with:
60+
name: tlsanalyzer-${{ matrix.suffix }}
61+
path: tlsanalyzer-${{ matrix.suffix }}.*
62+
63+
release:
64+
needs: build
65+
runs-on: ubuntu-latest
66+
steps:
67+
- uses: actions/checkout@v4
68+
69+
- name: Download all artifacts
70+
uses: actions/download-artifact@v4
71+
with:
72+
path: artifacts
73+
74+
- name: Create Release
75+
uses: softprops/action-gh-release@v1
76+
with:
77+
files: artifacts/**/*
78+
generate_release_notes: true

README.md

Lines changed: 37 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -90,21 +90,54 @@ tlsanalyzer example.com --format cbom -o crypto-inventory.json
9090

9191
## Installation
9292

93-
### From Source
93+
### macOS / Linux (Recommended)
94+
95+
Copy and paste this entire block into your terminal:
9496

9597
```bash
96-
# Requires Go 1.21+
98+
# Download, build, and install (requires Go 1.21+)
9799
git clone https://github.com/csnp/qramm-tls-analyzer.git
98100
cd qramm-tls-analyzer
99101
go build -o tlsanalyzer ./cmd/tlsanalyzer
102+
sudo mv tlsanalyzer /usr/local/bin/
103+
cd .. && rm -rf qramm-tls-analyzer
100104
```
101105

102-
### Using Go Install
106+
Verify it works:
107+
```bash
108+
tlsanalyzer --version
109+
```
110+
111+
### macOS / Linux (Alternative - No sudo)
112+
113+
If you don't have sudo access:
103114

104115
```bash
105-
go install github.com/csnp/qramm-tls-analyzer/cmd/tlsanalyzer@latest
116+
git clone https://github.com/csnp/qramm-tls-analyzer.git
117+
cd qramm-tls-analyzer
118+
go build -o tlsanalyzer ./cmd/tlsanalyzer
119+
mkdir -p ~/bin && mv tlsanalyzer ~/bin/
120+
echo 'export PATH="$HOME/bin:$PATH"' >> ~/.zshrc # or ~/.bashrc for bash
121+
source ~/.zshrc
106122
```
107123

124+
### Windows
125+
126+
```powershell
127+
git clone https://github.com/csnp/qramm-tls-analyzer.git
128+
cd qramm-tls-analyzer
129+
go build -o tlsanalyzer.exe ./cmd/tlsanalyzer
130+
# Move tlsanalyzer.exe to a folder in your PATH, or run from current directory
131+
```
132+
133+
### Don't have Go installed?
134+
135+
**macOS:** `brew install go`
136+
137+
**Ubuntu/Debian:** `sudo apt install golang-go`
138+
139+
**Windows:** Download from https://go.dev/dl/
140+
108141
### Pre-built Binaries
109142

110143
Download from [Releases](https://github.com/csnp/qramm-tls-analyzer/releases) for:

0 commit comments

Comments
 (0)