Skip to content

Remove agent filter dropdown from header (#70) #18

Remove agent filter dropdown from header (#70)

Remove agent filter dropdown from header (#70) #18

Workflow file for this run

name: Release
on:
push:
tags:
- 'v*'
permissions:
contents: read
jobs:
build:
strategy:
fail-fast: false
matrix:
include:
- os: ubuntu-latest
goos: linux
goarch: amd64
- os: ubuntu-latest
goos: linux
goarch: arm64
cc: aarch64-linux-gnu-gcc
- os: macos-15
goos: darwin
goarch: amd64
- os: macos-15
goos: darwin
goarch: arm64
- os: windows-latest
goos: windows
goarch: amd64
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
persist-credentials: false
- uses: actions/setup-go@4b73464bb391d4059bd26b0524d20df3927bd417 # v6.3.0
with:
go-version-file: go.mod
- uses: actions/setup-node@6044e13b5dc448c55e2357c09f80417699197238 # v6.2.0
with:
node-version: "24"
- name: Build frontend
run: npm ci && npm run build
working-directory: frontend
- name: Embed frontend
shell: bash
run: |
rm -rf internal/web/dist
cp -r frontend/dist internal/web/dist
- name: Install cross-compiler (Linux ARM64)
if: matrix.goarch == 'arm64' && matrix.goos == 'linux'
run: sudo apt-get update && sudo apt-get install -y gcc-aarch64-linux-gnu
- name: Setup MinGW (Windows)
if: matrix.goos == 'windows'
uses: msys2/setup-msys2@4f806de0a5a7294ffabaff804b38a9b435a73bda # v2
with:
msystem: MINGW64
update: false
install: mingw-w64-x86_64-gcc
path-type: inherit
- name: Build
shell: bash
env:
GOOS: ${{ matrix.goos }}
GOARCH: ${{ matrix.goarch }}
CGO_ENABLED: "1"
CC: ${{ matrix.cc || '' }}
run: |
VERSION=${GITHUB_REF#refs/tags/v}
COMMIT=${GITHUB_SHA::8}
BUILD_DATE=$(date -u +"%Y-%m-%dT%H:%M:%SZ")
EXT=""
if [ "$GOOS" = "windows" ]; then EXT=".exe"; fi
mkdir -p dist
LDFLAGS="-s -w -X main.version=v${VERSION} -X main.commit=${COMMIT} -X main.buildDate=${BUILD_DATE}"
go build -tags fts5 -ldflags="$LDFLAGS" -trimpath \
-o dist/agentsview${EXT} ./cmd/agentsview
cd dist
if [ "$GOOS" = "windows" ]; then
ARCHIVE="agentsview_${VERSION}_${{ matrix.goos }}_${{ matrix.goarch }}.zip"
7z a "$ARCHIVE" agentsview${EXT}
else
ARCHIVE="agentsview_${VERSION}_${{ matrix.goos }}_${{ matrix.goarch }}.tar.gz"
tar czf "$ARCHIVE" agentsview${EXT}
fi
rm agentsview${EXT}
- uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f # v6.0.0
with:
name: agentsview-${{ matrix.goos }}-${{ matrix.goarch }}
path: |
dist/*.tar.gz
dist/*.zip
release:
needs: build
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
persist-credentials: false
- uses: actions/download-artifact@37930b1c2abaa49bbe596cd826c3c89aef350131 # v7.0.0
with:
path: artifacts
merge-multiple: true
- name: Generate checksums
run: |
cd artifacts
sha256sum *.tar.gz *.zip > SHA256SUMS
cat SHA256SUMS
- name: Get tag message
id: tag_message
run: |
TAG_NAME="${GITHUB_REF#refs/tags/}"
TAG_TYPE=$(git cat-file -t "$TAG_NAME")
if [ "$TAG_TYPE" != "tag" ]; then
echo "Warning: $TAG_NAME is a lightweight tag, using auto-generated notes"
echo "has_body=false" >> $GITHUB_OUTPUT
exit 0
fi
TAG_MSG=$(git tag -l --format='%(contents:body)' "$TAG_NAME")
if [ -n "$TAG_MSG" ]; then
DELIM="TAGMSG_$(date +%s%N)"
echo "body<<$DELIM" >> $GITHUB_OUTPUT
echo "$TAG_MSG" >> $GITHUB_OUTPUT
echo "$DELIM" >> $GITHUB_OUTPUT
echo "has_body=true" >> $GITHUB_OUTPUT
else
echo "has_body=false" >> $GITHUB_OUTPUT
fi
- name: Create Release
uses: softprops/action-gh-release@a06a81a03ee405af7f2048a818ed3f03bbf83c7b # v2.5.0
with:
files: |
artifacts/*.tar.gz
artifacts/*.zip
artifacts/SHA256SUMS
body: ${{ steps.tag_message.outputs.has_body == 'true' && steps.tag_message.outputs.body || '' }}
generate_release_notes: ${{ steps.tag_message.outputs.has_body != 'true' }}