Skip to content

Commit 57ffd0f

Browse files
committed
goreleaser
1 parent e69baed commit 57ffd0f

File tree

5 files changed

+84
-106
lines changed

5 files changed

+84
-106
lines changed

.github/workflows/release.yml

Lines changed: 10 additions & 104 deletions
Original file line numberDiff line numberDiff line change
@@ -9,119 +9,25 @@ permissions:
99
contents: write # Required for creating releases and uploading assets
1010

1111
jobs:
12-
build:
13-
name: Build
12+
release:
13+
name: Release
1414
runs-on: ubuntu-latest
1515

16-
strategy:
17-
matrix:
18-
include:
19-
- goos: linux
20-
goarch: amd64
21-
binary_name: que
22-
- goos: linux
23-
goarch: arm64
24-
binary_name: que
25-
- goos: darwin
26-
goarch: amd64
27-
binary_name: que
28-
- goos: darwin
29-
goarch: arm64
30-
binary_name: que
31-
- goos: windows
32-
goarch: amd64
33-
binary_name: que.exe
34-
- goos: windows
35-
goarch: arm64
36-
binary_name: que.exe
37-
3816
steps:
3917
- name: Checkout code
4018
uses: actions/checkout@v4
19+
with:
20+
fetch-depth: 0 # Required for changelog generation
4121

4222
- name: Set up Go
4323
uses: actions/setup-go@v5
4424
with:
4525
go-version-file: 'go.mod'
4626

47-
- name: Get tag name
48-
id: tag
49-
run: echo "TAG_NAME=${GITHUB_REF#refs/tags/}" >> $GITHUB_OUTPUT
50-
51-
- name: Verify project structure
52-
run: |
53-
pwd
54-
ls -la
55-
test -d cmd/que || (echo "ERROR: cmd/que directory not found!" && exit 1)
56-
test -f cmd/que/main.go || (echo "ERROR: cmd/que/main.go not found!" && exit 1)
57-
58-
- name: Build binary
59-
env:
60-
GOOS: ${{ matrix.goos }}
61-
GOARCH: ${{ matrix.goarch }}
62-
CGO_ENABLED: 0
63-
run: |
64-
go build -ldflags="-s -w -X main.Version=${{ steps.tag.outputs.TAG_NAME }}" \
65-
-o ${{ matrix.binary_name }} \
66-
github.com/jenian/que/cmd/que
67-
68-
- name: Create archive
69-
shell: bash
70-
run: |
71-
if [ "${{ matrix.goos }}" == "windows" ]; then
72-
zip que-${{ matrix.goos }}-${{ matrix.goarch }}.zip ${{ matrix.binary_name }}
73-
else
74-
tar -czf que-${{ matrix.goos }}-${{ matrix.goarch }}.tar.gz ${{ matrix.binary_name }}
75-
fi
76-
77-
- name: Upload artifacts
78-
uses: actions/upload-artifact@v4
27+
- name: Run GoReleaser
28+
uses: goreleaser/goreleaser-action@v6
7929
with:
80-
name: que-${{ matrix.goos }}-${{ matrix.goarch }}
81-
path: que-${{ matrix.goos }}-${{ matrix.goarch }}.*
82-
83-
release:
84-
name: Create Release
85-
needs: build
86-
runs-on: ubuntu-latest
87-
if: startsWith(github.ref, 'refs/tags/')
88-
89-
steps:
90-
- name: Checkout code
91-
uses: actions/checkout@v4
92-
93-
- name: Get tag name
94-
id: tag
95-
run: echo "TAG_NAME=${GITHUB_REF#refs/tags/}" >> $GITHUB_OUTPUT
96-
97-
- name: Download all artifacts
98-
uses: actions/download-artifact@v4
99-
with:
100-
path: ./artifacts
101-
102-
- name: Create checksums
103-
shell: bash
104-
working-directory: artifacts
105-
run: |
106-
# Only checksum the archive files
107-
find . -type f \( -name "*.tar.gz" -o -name "*.zip" \) | sort | while read file; do
108-
if command -v sha256sum > /dev/null; then
109-
sha256sum "$file" >> checksums.txt
110-
elif command -v shasum > /dev/null; then
111-
shasum -a 256 "$file" >> checksums.txt
112-
fi
113-
done
114-
115-
- name: Create Release
116-
uses: softprops/action-gh-release@v2
117-
with:
118-
tag_name: ${{ steps.tag.outputs.TAG_NAME }}
119-
name: Release ${{ steps.tag.outputs.TAG_NAME }}
120-
files: |
121-
artifacts/**/*.tar.gz
122-
artifacts/**/*.zip
123-
artifacts/checksums.txt
124-
generate_release_notes: true
125-
draft: false
126-
prerelease: ${{ contains(steps.tag.outputs.TAG_NAME, '-') }}
127-
30+
version: latest
31+
args: release --clean
32+
env:
33+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

.goreleaser.yml

Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
# Goreleaser configuration for Que
2+
project_name: que
3+
4+
# Build configuration
5+
builds:
6+
- id: que
7+
main: ./cmd/que
8+
binary: que
9+
goos:
10+
- linux
11+
- darwin
12+
- windows
13+
goarch:
14+
- amd64
15+
- arm64
16+
env:
17+
- CGO_ENABLED=0
18+
ldflags:
19+
- -s -w
20+
- -X main.Version={{.Version}}
21+
flags:
22+
- -trimpath
23+
24+
# Archive configuration
25+
archives:
26+
- id: default
27+
format_overrides:
28+
- goos: windows
29+
format: zip
30+
name_template: >-
31+
{{ .ProjectName }}-{{ .Os }}-{{ .Arch }}{{ if .Arm }}v{{ .Arm }}{{ end }}
32+
files:
33+
- LICENSE
34+
- README.md
35+
36+
# Checksums
37+
checksum:
38+
name_template: 'checksums.txt'
39+
algorithm: sha256
40+
41+
# Release configuration
42+
release:
43+
mode: replace
44+
header: |
45+
## Que {{ .Tag }}
46+
47+
Automated release via [GoReleaser](https://goreleaser.com)
48+
footer: |
49+
---
50+
51+
Built with ❤️ by [GoReleaser](https://github.com/goreleaser/goreleaser)
52+
53+
# Mark pre-releases (tags containing '-')
54+
prerelease: auto
55+
56+
# Changelog
57+
changelog:
58+
sort: asc
59+
filters:
60+
exclude:
61+
- '^docs:'
62+
- '^test:'
63+
- Merge pull request
64+
- Merge branch
65+

README.md

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,16 @@
11
# Que
2-
32
> The pipe-able DevOps assistant.
43
4+
<img src="img/que_demo.gif" alt="Demo" style="flex: 1" />
5+
56
Que is a CLI utility designed to act as a filter in a Unix pipeline. It ingests stdin (logs, error tracebacks, config files), sanitizes the data for security, enriches it with local system context, and queries an LLM (ChatGPT or Claude) to determine the root cause and suggest a fix.
67

8+
## 🔒 Privacy & Security
9+
10+
**Que runs entirely locally.** It scrubs secrets (API keys, PII) using Gitleaks rules before the request leaves your machine. Logs are stateless and not stored.
11+
12+
13+
714
## Installation
815

916
### From Source (Recommended)

RELEASES.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Release Process
22

3-
This project uses GitHub Actions to automatically build and publish binaries when a new tag is pushed.
3+
This project uses [GoReleaser](https://goreleaser.com) with GitHub Actions to automatically build and publish binaries when a new tag is pushed.
44

55
## How to Create a Release
66

img/que_demo.gif

80.8 KB
Loading

0 commit comments

Comments
 (0)