ci: release job — test before publish, pin bash, fix diagnostic
release / release (push) Successful in 3m59s
build-ci-image / build (push) Successful in 7m27s
ci / gate (push) Successful in 2m27s

- Run cargo test before the build so a tag never publishes untested code.
- Pin shell: bash on the scripted steps; the runner defaults to dash,
  which rejected `set -o pipefail` and failed run 22's package step.
- Swap `file` (absent in the slim image) for `ls -l`.
This commit is contained in:
claude@clouddev1
2026-06-12 22:11:24 +00:00
parent bba24120f1
commit 89b9392c25
+10 -3
View File
@@ -6,8 +6,8 @@
# (aarch64, macOS, Windows) and the D3 package-manager manifests layer on later,
# step by step.
#
# Correctness comes from the branch gate (clippy + test) that ran when the
# tagged commit was pushed; this job builds + publishes, it does not re-test.
# Tests run here before the build so a tag can never publish untested code,
# even one pointing at a commit that was never gated on a branch.
name: release
on:
push:
@@ -24,14 +24,20 @@ jobs:
steps:
- uses: actions/checkout@v4
- name: test
run: nix develop -c cargo test --no-fail-fast
- name: build static binary
run: nix develop -c cargo build --release --target "$TARGET"
- name: package artifacts
# Pin bash: the runner defaults scripted steps to dash, which rejects
# `set -o pipefail`. bash is in the CI image.
shell: bash
run: |
set -euo pipefail
BIN="target/$TARGET/release/rdbms-playground"
file "$BIN"
ls -l "$BIN"
OUT="rdbms-playground-${{ github.ref_name }}-$TARGET"
mkdir -p dist
cp "$BIN" "dist/$OUT"
@@ -39,6 +45,7 @@ jobs:
ls -l dist
- name: publish gitea release + assets
shell: bash
env:
# Auto-provided by Gitea Actions; has repo write (release) scope.
TOKEN: ${{ secrets.GITEA_TOKEN }}