Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
* text=auto

# Shell scripts and YAML must keep LF line endings to run correctly
# when fetched raw from GitHub or executed in CI.
*.sh text eol=lf
*.yml text eol=lf
*.yaml text eol=lf
*.go text eol=lf

# PowerShell scripts work with either, but CRLF is conventional on Windows.
*.ps1 text eol=crlf
6 changes: 6 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,12 @@ jobs:
- name: Download dependencies
run: go mod tidy

- name: Check formatting
run: test -z "$(gofmt -l .)" || (gofmt -l . && exit 1)

- name: Vet
run: go vet ./...

- name: Build
run: go build -v ./...

Expand Down
66 changes: 66 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
name: Release

on:
push:
tags:
- 'v*'

permissions:
contents: write

jobs:
build:
name: Build ${{ matrix.name }}
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
include:
- { goos: darwin, goarch: amd64, name: rankcore-darwin-amd64 }
- { goos: darwin, goarch: arm64, name: rankcore-darwin-arm64 }
- { goos: linux, goarch: amd64, name: rankcore-linux-amd64 }
- { goos: linux, goarch: arm64, name: rankcore-linux-arm64 }
- { goos: windows, goarch: amd64, name: rankcore-windows-amd64.exe }
- { goos: windows, goarch: arm64, name: rankcore-windows-arm64.exe }
steps:
- uses: actions/checkout@v4

- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: '1.23'

- name: Build binary
env:
GOOS: ${{ matrix.goos }}
GOARCH: ${{ matrix.goarch }}
CGO_ENABLED: 0
run: go build -trimpath -ldflags "-s -w" -o ${{ matrix.name }} ./cmd/rankcore

- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: ${{ matrix.name }}
path: ${{ matrix.name }}

publish:
name: Publish release
needs: build
runs-on: ubuntu-latest
steps:
- name: Download all binaries
uses: actions/download-artifact@v4
with:
path: dist
pattern: rankcore-*
merge-multiple: true

- name: Generate SHA-256 checksums
working-directory: dist
run: sha256sum rankcore-* > checksums.txt

- name: Create GitHub Release
uses: softprops/action-gh-release@v2
with:
files: dist/*
generate_release_notes: true
16 changes: 16 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# Binaries
*.exe
*.exe~
*.dll
*.so
*.dylib
rankcore

# Test artifacts & audit output
audit-report.json
audit-report.md
verification-report.json
verification-report.md
.rank/
dist/
build/
Loading
Loading