- The workspace starts at 1.0.0. For later releases, run
cargo xtask bump-version --patch(or--minor,--major, or an explicit version such as1.1.0), then commit and push.cargo xtask versionprints the current version. - Tag and push (
git tag v1.0.0 && git push origin v1.0.0), or start the workflow by hand on any branch (Actions → Release BarSQL → Run workflow) with the version, and it tags the commit it runs on. .github/workflows/release.ymlchecks that the tag matchesCargo.tomland isn't already on another commit, then builds for Linux (x86-64 and ARM64, in Ubuntu 22.04 containers), Windows and macOS while the full test suite runs on all three. Once both pass, it publishes every asset plusSHA256SUMS, each with a build provenance attestation thatgh attestation verify <file> --repo Bare7a/BarSQLchecks.
Run the workflow by hand with the version left empty to build the packages without publishing them; they stay on the run's page for 7 days.
cargo xtask package builds this OS's packages locally, into target/package/dist (on Linux, after cargo install cargo-deb cargo-generate-rpm). BARSQL_RELEASE_DIR=<that folder> cargo test -p barsql-app a_packaged_release_stages_its_app runs the updater over them.
| Script | Portable updater asset (one top-level entry) | Other downloads |
|---|---|---|
scripts/package-macos.sh |
BarSQL-darwin-arm64.zip, BarSQL-darwin-amd64.zip (a BarSQL.app per architecture) |
BarSQL-macos-universal.dmg |
scripts/package-windows.sh |
BarSQL-windows-amd64.zip (BarSQL.exe) |
BarSQL.exe, BarSQL-amd64-installer.exe |
scripts/package-linux.sh |
BarSQL-linux-amd64.tar.gz, BarSQL-linux-arm64.tar.gz (BarSQL) |
BarSQL-x86_64.AppImage, BarSQL-aarch64.AppImage, and on x86-64 BarSQL, BarSQL.deb, BarSQL.rpm |
packaging/linux/PKGBUILD (release workflow, in an Arch Linux container) |
BarSQL.pkg.tar.zst |
- Only the portable updater assets name both a platform and an architecture, so portable copies never pick another download. The AppImage and the packages update from their own asset, and the installer and the dmg from the
.zip. - Release builds turn on the
productionfeature, which enables the update check at launch. The release profile uses thin LTO and strips symbols. - macOS: an
.appfor macOS 12 and later, signed with the Developer ID and notarized through the signing secrets, which a release requires. A fork or a build-only run without them signs it ad-hoc. Each zip holds its own architecture alone, half the size of a universal app, since the updater downloads the zip for the Mac's own chip, even from an Intel build running under Rosetta. The dmg holds alipouniversal app and anApplicationslink, so a copy installed from it keeps only its own architecture after its first update.BARSQL_NATIVE_ONLY=1builds this Mac's architecture alone. - Windows:
crates/barsql/build.rsembeds the icon and the version block. Neither the.exenor the installer is code-signed, so SmartScreen asks once before the first launch.packaging/windows/installer.nsiinstalls the app with theSQLite Databasefile class for.db,.sqlite,.sqlite3,.s3dband.sl3. - Linux:
cargo-debandcargo-generate-rpmbuild the deb and rpm fromcrates/barsql/Cargo.toml, andmakepkgbuilds the Arch package frompackaging/linux/PKGBUILD. Each installs/usr/bin/BarSQLand a desktop entry that opens SQLite files; the deb and rpm work out their library dependencies from the binary. The window's app id isBarSQL, so Wayland docks match it toBarSQL.desktop. Both builds run in anubuntu:22.04container on GitHub'subuntu-24.04andubuntu-24.04-armrunners, so the binaries need glibc 2.35 at most, which the build checks, and run on Ubuntu 22.04, Debian 12, Fedora 36, RHEL 10 and later. The ARM64 build makes only the tarball and the AppImage: every released version picks a.deb,.rpmor.pkg.tar.zstby its extension alone, so an ARM package would reach x86-64 copies too. - Compression: the dmg is LZMA (
ULMO, which macOS 10.15 and later open), the installer uses a 64 MB LZMA dictionary, the rpm an xz payload and the Arch packagezstd --ultra -20. The deb keeps cargo-deb's xz and the AppImage appimagetool's zstd. The updater assets stay deflate.zipand gzip.tar.gz, the only formats released versions unpack. - The icon's source is
packaging/icon.svg. The macOS.icnssets it on Apple's icon grid (an 824px body on a 1024px canvas, with a shadow). Windows and Linux show the stack without its tile, since their taskbars and docks are mostly dark and the dark tile would disappear there, leaving the stack looking small. The title bar shows the stack too, in a dark and a light version (crates/barsql-ui/images/barsql-mark-*.svg).cargo xtask iconsregenerates the set from it: the Linux PNGs,icon.ico,icons.icnsanddocs/icon.png, each size rendered from the vector, and the SVG copies for the app (the marks and its icon) anddocs/.
With these repository secrets, the release workflow signs the apps and the dmg with the Developer ID and the hardened runtime, has Apple notarize them, and staples the tickets, so Gatekeeper opens BarSQL without asking. The README promises a notarized Mac app, so a release of Bare7a/BarSQL fails without them. A fork or a build-only run without them signs the apps ad-hoc and skips notarization.
| Secret | Value |
|---|---|
MACOS_CERTIFICATE |
The Developer ID Application certificate with its private key, exported from Keychain Access as a .p12, in base64: base64 -i DeveloperID.p12 | pbcopy |
MACOS_CERTIFICATE_PASSWORD |
The password the .p12 was exported with |
APPLE_API_KEY |
The text of an App Store Connect API key's .p8 file: a team key with the Developer role, from Users and Access → Integrations → App Store Connect API |
APPLE_API_KEY_ID |
That key's Key ID |
APPLE_API_ISSUER |
The Issuer ID shown above the keys |
- Only the account holder can create a Developer ID Application certificate: Xcode → Settings → Accounts → Manage Certificates → + → Developer ID Application.
packaging/macos/BarSQL.entitlementsturns off library validation, which the hardened runtime would otherwise use to refuse SQLite extensions signed by other developers or ad-hoc.packaging/macos/DeveloperIDG2CA.ceris Apple's Developer ID intermediate certificate, which a.p12export leaves out and the workflow adds to its keychain. It expires in September 2031; replace it from apple.com/certificateauthority before then.- To try the secrets without publishing, run the workflow by hand with the version left empty. Unzip
BarSQL-darwin-arm64.zipfrom the run'sdist-macosartifact:spctl -a -vv BarSQL.appshould reportsource=Notarized Developer ID, andxcrun stapler validateshould pass for the app and the dmg. - Locally,
BARSQL_MACOS_IDENTITYsigns with a certificate in the login keychain, named as"Developer ID Application: …"or, when two share that name, by the SHA-1 hashsecurity find-identity -v -p codesigninglists.BARSQL_NOTARY_KEY(the.p8file's path),BARSQL_NOTARY_KEY_IDandBARSQL_NOTARY_ISSUERnotarize too.
Release builds check Bare7a/BarSQL's releases at launch and offer a newer one with a toast. About → Check for Updates does the same at any time. The code lives in crates/barsql-app/src/update* and crates/barsql-ui/src/update_dialog.rs.
- Check. The latest release, if it is newer than this build. The asset depends on how this copy was installed: the
.zipor.tar.gznamed for this platform and architecture, or the.AppImage,.deb,.rpmor.pkg.tar.zstwhen the app came as one. Its digest comes fromSHA256SUMS. - Install Update. The download goes to a fresh
barsql-update-*folder in the temp directory, with progress. Its SHA-256 is checked, then the archive's single top-level entry is unpacked, guarded against zip-slip, links and oversized entries. An AppImage or a package stays as it is. An asset thatSHA256SUMSdoes not list is refused. Closing the dialog leaves the download running, and Check for Updates reopens it where it got to. A folder left by an app that quit or crashed without applying its download is removed at a later launch, once that app is gone and nothing has touched the folder for an hour. - Restart & Apply. The app relaunches itself as a helper with the
BARSQL_UPDATER_*variables set, then quits. The helper first marks the download's folder as in use, so a BarSQL started meanwhile leaves it alone. It waits for the app to exit, swapsBarSQL.app, the binary or the AppImage while keeping a backup until the new version has launched, restores the backup on failure, and logs toupdate.login the data folder, starting it afresh each time.- When the folder isn't writable, like Program Files or
/usr/local/bin, the swap runs asBarSQL --barsql-update-swapbehind the system's admin prompt (UAC, the macOS password dialog or pkexec). On Windows it also updates the installer's version under Installed apps. - Windows can't delete the running
BarSQL.exe, so the swap moves it aside asBarSQL.exe.old.<n>. The new version deletes that once the helper has exited, or, in a folder that needs admin rights, Windows deletes it at the next restart. - The Linux packages are installed with
dpkg -i,rpm -Uorpacman -Uthrough pkexec instead. - If the prompt is cancelled or anything fails, the old version starts again.
- When the folder isn't writable, like Program Files or