feat(build): add GitHub mirror CI and release workflows
ci / vet, staticcheck, test, build (push) Canceled after 0s

Mirror the repository to github.com/k3nnyfr/glint and build releases there
as well as on Gitea.

- .github/workflows/ci.yml: vet, staticcheck, test, build
- .github/workflows/release.yml: build the six platform binaries and
  publish a GitHub release on each v* tag
- action.yml: download from GitHub releases and pick the binary matching
  the runner OS/arch instead of always linux-amd64
- README/INSTALL/CHANGELOG: document the mirror, Homebrew tap renamed to
  k3nnyfr/homebrew-glint

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-09-24 22:20:20 +02:00
co-authored by Claude Opus 5.5
parent 7fcbe9b7f5
commit 391ff518e4
6 changed files with 137 additions and 16 deletions
+36
View File
@@ -0,0 +1,36 @@
name: ci
on:
push:
branches:
- '**'
pull_request:
permissions:
contents: read
jobs:
ci:
name: vet, staticcheck, test, build
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Go
uses: actions/setup-go@v5
with:
go-version-file: go.mod
- name: vet
run: go vet ./...
- name: staticcheck
run: go tool staticcheck ./...
- name: test
run: go test ./...
- name: build
run: go build ./cmd/glint/...
+51
View File
@@ -0,0 +1,51 @@
name: release
on:
push:
tags:
- 'v*'
permissions:
contents: write
jobs:
release:
name: Build and publish release
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Go
uses: actions/setup-go@v5
with:
go-version-file: go.mod
- name: Build binaries
env:
CGO_ENABLED: "0"
TAG: ${{ github.ref_name }}
run: |
mkdir -p dist
for target in linux/amd64 linux/arm64 darwin/amd64 darwin/arm64 windows/amd64 windows/arm64; do
os=${target%/*}
arch=${target#*/}
ext=""
[ "$os" = "windows" ] && ext=".exe"
GOOS=$os GOARCH=$arch go build -trimpath \
-ldflags="-s -w -X main.version=${TAG}" \
-o "dist/glint-${TAG}-${os}-${arch}${ext}" \
./cmd/glint/...
echo "built: glint-${TAG}-${os}-${arch}${ext}"
done
- name: Create release and upload assets
env:
GH_TOKEN: ${{ github.token }}
TAG: ${{ github.ref_name }}
run: |
gh release create "$TAG" dist/* \
--repo "$GITHUB_REPOSITORY" \
--title "$TAG" \
--notes "See [CHANGELOG.md](https://github.com/${GITHUB_REPOSITORY}/blob/${TAG}/CHANGELOG.md) for details."
+11
View File
@@ -5,6 +5,17 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/).
This project uses [Semantic Versioning](https://semver.org).
## [Unreleased]
### Added
- **GitHub mirror and release builds** — the repository is mirrored to [github.com/k3nnyfr/glint](https://github.com/k3nnyfr/glint). New `.github/workflows/ci.yml` (vet, staticcheck, test, build) and `.github/workflows/release.yml` build the six platform binaries and publish a GitHub release on each `v*` tag. The Gitea workflows in `.gitea/workflows/` are unchanged; Gitea ignores `.github/workflows/` when `.gitea/workflows/` exists.
### Changed
- **GitHub Action downloads from GitHub releases** — `action.yml` now fetches the binary from `github.com/k3nnyfr/glint` releases instead of git.k3nny.fr, and picks the binary matching the runner OS (Linux, macOS, Windows) and architecture (x64, ARM64) instead of always using `linux-amd64`. Reference it as `k3nnyfr/glint@<tag>`.
- **Homebrew tap renamed** — documentation now points to `k3nnyfr/homebrew-glint`.
## [0.5.1] - 2026-07-30
### Fixed
+8 -4
View File
@@ -27,7 +27,11 @@ sudo mv glint /usr/local/bin/
## Option 2 — Download a pre-built binary
Pre-built binaries are attached to each [release](https://git.k3nny.fr/k3nny/glint/releases).
Pre-built binaries are attached to each release, on both
[git.k3nny.fr](https://git.k3nny.fr/k3nny/glint/releases) and the
[GitHub mirror](https://github.com/k3nnyfr/glint/releases). The examples below
use git.k3nny.fr; replace the base URL with
`https://github.com/k3nnyfr/glint/releases/download` to download from GitHub.
| Platform | File |
|----------|------|
@@ -84,14 +88,14 @@ glint --version
## Option 3 — Homebrew (macOS and Linux)
A Homebrew tap is available at `k3nny/glint`.
A Homebrew tap is available at `k3nnyfr/glint`.
> **First-time setup:** create a GitHub repository named `homebrew-glint`
> under your account and copy [`Formula/glint.rb`](Formula/glint.rb) into it.
> under the `k3nnyfr` account and copy [`Formula/glint.rb`](Formula/glint.rb) into it.
> Users then install via the tap as shown below.
```bash
brew tap k3nny/glint https://github.com/k3nny/homebrew-glint
brew tap k3nnyfr/glint https://github.com/k3nnyfr/homebrew-glint
brew install glint
```
+7 -4
View File
@@ -58,6 +58,8 @@ Use **glint** when you want fast, offline, dependency-free pipeline validation
## Installation
glint is developed on [git.k3nny.fr/k3nny/glint](https://git.k3nny.fr/k3nny/glint) and mirrored to GitHub at [github.com/k3nnyfr/glint](https://github.com/k3nnyfr/glint). Release binaries are published on both.
See [INSTALL.md](INSTALL.md) for all options: pre-built binaries (Linux amd64/arm64, macOS Intel/Apple Silicon, Windows), Homebrew tap, and building from source.
Quick start (Linux/macOS, building from source):
@@ -72,7 +74,7 @@ sudo mv glint /usr/local/bin/
Homebrew:
```bash
brew tap k3nny/glint https://github.com/k3nny/homebrew-glint
brew tap k3nnyfr/glint https://github.com/k3nnyfr/homebrew-glint
brew install glint
```
@@ -133,16 +135,17 @@ The component downloads the glint Linux binary, runs `glint check`, and respects
### GitHub Actions
Copy [`action.yml`](action.yml) from this repository, or mirror this repo to GitHub as `k3nny/glint` and reference it directly:
Reference the action from the GitHub mirror:
```yaml
- uses: k3nny/glint@v0.3.0
- uses: k3nnyfr/glint@vX.Y.Z
with:
file: .gitlab-ci.yml # optional, default: .gitlab-ci.yml
args: '--format sarif' # optional
version: latest # optional, default: latest
```
The action downloads the glint Linux binary into `$RUNNER_TEMP` and runs `glint check`. Only Linux runners are supported (matches the available release binary).
The action downloads the glint binary matching the runner (Linux, macOS or Windows; x64 or ARM64) from the GitHub releases into `$RUNNER_TEMP` and runs `glint check`. You can also copy [`action.yml`](action.yml) into your own repository and use it as a local action.
### VS Code extension
+24 -8
View File
@@ -1,8 +1,8 @@
# GitHub Actions composite action — glint pipeline validator
#
# To use this action, mirror this repository to GitHub as k3nny/glint, then:
# Usage (from the GitHub mirror at k3nnyfr/glint):
#
# - uses: k3nny/glint@v0.2.28
# - uses: k3nnyfr/glint@vX.Y.Z
# with:
# file: .gitlab-ci.yml # optional
#
@@ -22,7 +22,7 @@ branding:
inputs:
version:
description: >-
glint release tag to install (e.g. 'v0.2.28'). Defaults to 'latest'
glint release tag to install (e.g. 'v0.6.0'). Defaults to 'latest'
which resolves to the newest published release.
required: false
default: 'latest'
@@ -42,20 +42,36 @@ runs:
shell: bash
env:
GLINT_VERSION: ${{ inputs.version }}
GH_TOKEN: ${{ github.token }}
run: |
set -euo pipefail
REPO="k3nnyfr/glint"
if [ "$GLINT_VERSION" = "latest" ]; then
GLINT_VERSION=$(curl -sf \
"https://git.k3nny.fr/api/v1/repos/k3nny/glint/releases?limit=1" \
-H "Authorization: Bearer $GH_TOKEN" \
"https://api.github.com/repos/${REPO}/releases/latest" \
| grep '"tag_name"' | head -1 | cut -d'"' -f4)
fi
case "$RUNNER_OS" in
Linux) OS=linux ;;
macOS) OS=darwin ;;
Windows) OS=windows ;;
*) echo "unsupported runner OS: $RUNNER_OS" >&2; exit 1 ;;
esac
case "$RUNNER_ARCH" in
X64) ARCH=amd64 ;;
ARM64) ARCH=arm64 ;;
*) echo "unsupported runner arch: $RUNNER_ARCH" >&2; exit 1 ;;
esac
EXT=""
[ "$OS" = "windows" ] && EXT=".exe"
DEST="$RUNNER_TEMP/glint-bin"
mkdir -p "$DEST"
URL="https://git.k3nny.fr/k3nny/glint/releases/download/${GLINT_VERSION}/glint-${GLINT_VERSION}-linux-amd64"
curl -sfL "$URL" -o "$DEST/glint"
chmod +x "$DEST/glint"
URL="https://github.com/${REPO}/releases/download/${GLINT_VERSION}/glint-${GLINT_VERSION}-${OS}-${ARCH}${EXT}"
curl -sfL "$URL" -o "$DEST/glint${EXT}"
chmod +x "$DEST/glint${EXT}"
echo "$DEST" >> "$GITHUB_PATH"
"$DEST/glint" --version
"$DEST/glint${EXT}" --version
- name: Run glint check
shell: bash