ci: modernize release verification

This commit is contained in:
germondai
2026-08-10 19:21:07 +02:00
parent 693d81b84e
commit 196243c950
5 changed files with 39 additions and 47 deletions
+2 -11
View File
@@ -10,18 +10,9 @@ jobs:
check:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v7
- uses: oven-sh/setup-bun@v2
with:
bun-version: 1.3.14
- run: bun install --frozen-lockfile
# Biome: format + lint + organize-imports
- run: bun run check
# TypeScript
- run: bun --cwd packages/types typecheck
- run: bun --cwd packages/browser typecheck
- run: bun --cwd packages/tiers typecheck
- run: bun --cwd apps/api typecheck
- run: bun --cwd apps/web typecheck
# Unit and proxy integration tests
- run: bun test
- run: bun run verify
+8 -8
View File
@@ -45,22 +45,22 @@ jobs:
contents: read
packages: write
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v7
- uses: docker/login-action@v3
- uses: docker/login-action@v4
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- uses: docker/setup-buildx-action@v3
- uses: docker/setup-buildx-action@v4
- name: Sanitize platform name
run: |
platform=${{ matrix.platform }}
echo "PLATFORM_PAIR=${platform//\//-}" >> $GITHUB_ENV
- uses: docker/build-push-action@v6
- uses: docker/build-push-action@v7
id: build
with:
context: .
@@ -82,7 +82,7 @@ jobs:
digest="${{ steps.build.outputs.digest }}"
touch "/tmp/digests/${digest#sha256:}"
- uses: actions/upload-artifact@v4
- uses: actions/upload-artifact@v7
with:
name: digests-baseline-${{ env.PLATFORM_PAIR }}
path: /tmp/digests/*
@@ -96,19 +96,19 @@ jobs:
contents: read
packages: write
steps:
- uses: actions/download-artifact@v4
- uses: actions/download-artifact@v8
with:
path: /tmp/digests
pattern: digests-baseline-*
merge-multiple: true
- uses: docker/login-action@v3
- uses: docker/login-action@v4
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- uses: docker/setup-buildx-action@v3
- uses: docker/setup-buildx-action@v4
- name: Compute tags
id: tags
+11 -11
View File
@@ -38,17 +38,17 @@ jobs:
packages: write
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v7
- uses: docker/login-action@v3
- uses: docker/login-action@v4
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- uses: docker/setup-buildx-action@v3
- uses: docker/setup-buildx-action@v4
- uses: docker/metadata-action@v5
- uses: docker/metadata-action@v6
id: meta
with:
images: ${{ env.IMAGE }}
@@ -58,7 +58,7 @@ jobs:
platform=${{ matrix.platform }}
echo "PLATFORM_PAIR=${platform//\//-}" >> $GITHUB_ENV
- uses: docker/build-push-action@v6
- uses: docker/build-push-action@v7
id: build
with:
context: .
@@ -78,7 +78,7 @@ jobs:
digest="${{ steps.build.outputs.digest }}"
touch "/tmp/digests/${digest#sha256:}"
- uses: actions/upload-artifact@v4
- uses: actions/upload-artifact@v7
with:
name: digests-nightly-${{ env.PLATFORM_PAIR }}
path: /tmp/digests/*
@@ -93,21 +93,21 @@ jobs:
packages: write
steps:
- uses: actions/download-artifact@v4
- uses: actions/download-artifact@v8
with:
path: /tmp/digests
pattern: digests-nightly-*
merge-multiple: true
- uses: docker/login-action@v3
- uses: docker/login-action@v4
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- uses: docker/setup-buildx-action@v3
- uses: docker/setup-buildx-action@v4
- uses: docker/metadata-action@v5
- uses: docker/metadata-action@v6
id: meta
with:
images: ${{ env.IMAGE }}
@@ -133,4 +133,4 @@ jobs:
# github.sha which disagreed with what got pushed (type=sha writes
# short 7-char SHA but github.sha is the full 40-char hash).
tag=$(jq -r '.tags[0]' <<< "$DOCKER_METADATA_OUTPUT_JSON")
docker buildx imagetools inspect "$tag"
docker buildx imagetools inspect "$tag"
+10 -11
View File
@@ -43,17 +43,17 @@ jobs:
packages: write
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v7
- uses: docker/login-action@v3
- uses: docker/login-action@v4
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- uses: docker/setup-buildx-action@v3
- uses: docker/setup-buildx-action@v4
- uses: docker/metadata-action@v5
- uses: docker/metadata-action@v6
id: meta
with:
images: ${{ env.IMAGE }}
@@ -63,7 +63,7 @@ jobs:
platform=${{ matrix.platform }}
echo "PLATFORM_PAIR=${platform//\//-}" >> $GITHUB_ENV
- uses: docker/build-push-action@v6
- uses: docker/build-push-action@v7
id: build
with:
context: .
@@ -83,7 +83,7 @@ jobs:
digest="${{ steps.build.outputs.digest }}"
touch "/tmp/digests/${digest#sha256:}"
- uses: actions/upload-artifact@v4
- uses: actions/upload-artifact@v7
with:
name: digests-release-${{ env.PLATFORM_PAIR }}
path: /tmp/digests/*
@@ -98,21 +98,21 @@ jobs:
packages: write
steps:
- uses: actions/download-artifact@v4
- uses: actions/download-artifact@v8
with:
path: /tmp/digests
pattern: digests-release-*
merge-multiple: true
- uses: docker/login-action@v3
- uses: docker/login-action@v4
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- uses: docker/setup-buildx-action@v3
- uses: docker/setup-buildx-action@v4
- uses: docker/metadata-action@v5
- uses: docker/metadata-action@v6
id: meta
with:
images: ${{ env.IMAGE }}
@@ -136,4 +136,3 @@ jobs:
# ("ghcr.io/germondai/trawl:1.0.0" / ":latest") so no $IMAGE prefix needed.
tag=$(jq -r '.tags[0]' <<< "$DOCKER_METADATA_OUTPUT_JSON")
docker buildx imagetools inspect "$tag"
+8 -6
View File
@@ -17,7 +17,7 @@ For security issues, **do not open a public issue** — see [SECURITY.md](SECURI
## Development setup
Requirements: **Bun ≥ 1.1** and **Docker** (for the Redis service used in tests).
Requirements: **Bun 1.3.14** and **Docker** (for the Redis service used in tests).
```bash
git clone https://github.com/germondai/trawl.git
@@ -41,12 +41,14 @@ The API requires Redis. The fastest way is `docker compose up -d redis`.
We use [Biome](https://biomejs.dev/) for both:
```bash
bun run lint # check
bun run format # write
bun run check # format + lint + import sort, write
bun run check # read-only format, lint, and import-order check
bun run fix # apply safe Biome fixes and formatting
bun run typecheck # typecheck all five TypeScript workspaces
bun run build # production-build the web and docs apps
bun run verify # full release gate: check, types, tests, and builds
```
CI runs `bun run lint` on every PR.
CI runs `bun run verify` on every PR.
## Project layout
@@ -81,7 +83,7 @@ The `type` is one of `feat`, `fix`, `chore`, `docs`, `ci`, `refactor`, `test`, `
1. **Open an issue first** for non-trivial changes. A two-paragraph problem statement is enough.
2. **Branch from `main`.** Use a descriptive name (`feat/captcha-hcaptcha`, `fix/redis-reconnect`).
3. **Run `bun run check` before pushing.** Lint and format must be clean.
3. **Run `bun run verify` before pushing.** Lint, types, tests, and production builds must be clean.
4. **Update `CHANGELOG.md`** under `## [Unreleased]` for any user-visible change.
5. **Fill out the PR template** — the checklist catches the easy-to-miss items.
6. **Keep PRs focused.** One feature or fix per PR; large refactors should be split.