chore: bootstrap independent git workflow
Some checks failed
release-smoke / macos-13 / x86_64-apple-darwin (push) Has been cancelled
release-smoke / ubuntu-latest / x86_64-unknown-linux-gnu (push) Has been cancelled
release-smoke / windows-latest / x86_64-pc-windows-msvc (push) Has been cancelled

Co-Authored-By: Paperclip <noreply@paperclip.ing>
This commit is contained in:
Paperclip CTO
2026-03-26 03:49:06 +00:00
commit 7424491944
60 changed files with 7793 additions and 0 deletions

100
.github/workflows/release-smoke.yml vendored Normal file
View File

@@ -0,0 +1,100 @@
name: release-smoke
on:
workflow_dispatch:
push:
paths:
- ".github/workflows/release-smoke.yml"
- "Cargo.toml"
- "Cargo.lock"
- "apps/**"
- "crates/**"
- "README.md"
- "RELEASE_RUNBOOK.md"
- "SMOKE_RUNBOOK.md"
- "scripts/release/**"
jobs:
build-release-artifacts:
name: ${{ matrix.os }} / ${{ matrix.target }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
include:
- os: ubuntu-latest
target: x86_64-unknown-linux-gnu
archive_ext: tar.gz
binary_name: dbtool
- os: macos-13
target: x86_64-apple-darwin
archive_ext: tar.gz
binary_name: dbtool
- os: windows-latest
target: x86_64-pc-windows-msvc
archive_ext: zip
binary_name: dbtool.exe
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
with:
targets: ${{ matrix.target }}
- name: Resolve release metadata
shell: bash
run: |
version="$(node scripts/release/version.mjs)"
echo "APP_VERSION=$version" >> "$GITHUB_ENV"
echo "ARTIFACT_BASENAME=dbtool-$version-${{ matrix.target }}" >> "$GITHUB_ENV"
- name: Build release binary
run: cargo build --release --bin dbtool
- name: Smoke binary on Unix
if: runner.os != 'Windows'
shell: bash
run: scripts/release/smoke-binary.sh "target/release/${{ matrix.binary_name }}"
- name: Smoke binary on Windows
if: runner.os == 'Windows'
shell: pwsh
run: |
$binary = "target/release/${{ matrix.binary_name }}"
& $binary --help | Out-Host
& $binary --version | Out-Host
- name: Package Unix artifact
if: runner.os != 'Windows'
shell: bash
run: scripts/release/package-unix.sh "${{ matrix.target }}" "target/release/${{ matrix.binary_name }}"
- name: Package Windows artifact
if: runner.os == 'Windows'
shell: pwsh
run: |
$artifactDir = Join-Path "dist" $env:ARTIFACT_BASENAME
New-Item -ItemType Directory -Force -Path $artifactDir | Out-Null
Copy-Item "target/release/${{ matrix.binary_name }}" (Join-Path $artifactDir "${{ matrix.binary_name }}")
Copy-Item "README.md" (Join-Path $artifactDir "README.md")
Copy-Item "RELEASE_RUNBOOK.md" (Join-Path $artifactDir "RELEASE_RUNBOOK.md")
Copy-Item "SMOKE_RUNBOOK.md" (Join-Path $artifactDir "SMOKE_RUNBOOK.md")
$archivePath = "dist/$env:ARTIFACT_BASENAME.zip"
if (Test-Path $archivePath) {
Remove-Item $archivePath -Force
}
Compress-Archive -Path "$artifactDir/*" -DestinationPath $archivePath
$hash = (Get-FileHash -Path $archivePath -Algorithm SHA256).Hash.ToLowerInvariant()
Set-Content -Path "$archivePath.sha256" -Value "$hash $(Split-Path $archivePath -Leaf)"
- name: Upload packaged artifact
uses: actions/upload-artifact@v4
with:
name: ${{ env.ARTIFACT_BASENAME }}
path: |
dist/${{ env.ARTIFACT_BASENAME }}.${{ matrix.archive_ext }}
dist/${{ env.ARTIFACT_BASENAME }}.${{ matrix.archive_ext }}.sha256
if-no-files-found: error