feat(usage): add SQLite usage records and portable tooling
This commit is contained in:
1 parent
41efeebcbb
commit
c6ea0fecd9
13 files changed
+3630
-83
No files matched your search
@@ -0,0 +1,94 @@
|
||||
name: Build portable releases
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
push:
|
||||
tags:
|
||||
- 'v*'
|
||||
|
||||
permissions:
|
||||
contents: write
|
||||
|
||||
jobs:
|
||||
build:
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
include:
|
||||
- runner: ubuntu-24.04
|
||||
os: linux
|
||||
arch: amd64
|
||||
suffix: tar.gz
|
||||
- runner: ubuntu-24.04-arm
|
||||
os: linux
|
||||
arch: aarch64
|
||||
suffix: tar.gz
|
||||
- runner: macos-15-intel
|
||||
os: darwin
|
||||
arch: amd64
|
||||
suffix: tar.gz
|
||||
- runner: macos-15
|
||||
os: darwin
|
||||
arch: aarch64
|
||||
suffix: tar.gz
|
||||
- runner: windows-2025
|
||||
os: windows
|
||||
arch: amd64
|
||||
suffix: zip
|
||||
- runner: windows-11-arm
|
||||
os: windows
|
||||
arch: aarch64
|
||||
suffix: zip
|
||||
runs-on: ${{ matrix.runner }}
|
||||
steps:
|
||||
- uses: actions/checkout@v6
|
||||
- uses: oven-sh/setup-bun@v2
|
||||
with:
|
||||
bun-version: 1.3.14
|
||||
- uses: dtolnay/rust-toolchain@stable
|
||||
- name: Install Linux dependencies
|
||||
if: matrix.os == 'linux'
|
||||
run: |
|
||||
sudo apt-get update
|
||||
sudo apt-get install -y libwebkit2gtk-4.1-dev libappindicator3-dev librsvg2-dev patchelf
|
||||
- name: Build GUI
|
||||
run: |
|
||||
bun install --frozen-lockfile
|
||||
bun tauri build --no-bundle
|
||||
shell: bash
|
||||
- name: Prepare portable directory
|
||||
run: >-
|
||||
node scripts/prepare-portable.mjs
|
||||
--binary "src-tauri/target/release/cpa-gui${{ matrix.os == 'windows' && '.exe' || '' }}"
|
||||
--output "release/cpa-gui-${{ matrix.os }}-${{ matrix.arch }}"
|
||||
--os "${{ matrix.os }}"
|
||||
--arch "${{ matrix.arch }}"
|
||||
--download true
|
||||
--clean-core true
|
||||
shell: bash
|
||||
- name: Archive Unix release
|
||||
if: matrix.os != 'windows'
|
||||
run: tar -czf "cpa-gui-${{ matrix.os }}-${{ matrix.arch }}.tar.gz" -C release "cpa-gui-${{ matrix.os }}-${{ matrix.arch }}"
|
||||
- name: Archive Windows release
|
||||
if: matrix.os == 'windows'
|
||||
shell: pwsh
|
||||
run: Compress-Archive -Path "release/cpa-gui-${{ matrix.os }}-${{ matrix.arch }}" -DestinationPath "cpa-gui-${{ matrix.os }}-${{ matrix.arch }}.zip"
|
||||
- uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: cpa-gui-${{ matrix.os }}-${{ matrix.arch }}
|
||||
path: cpa-gui-${{ matrix.os }}-${{ matrix.arch }}.${{ matrix.suffix }}
|
||||
if-no-files-found: error
|
||||
|
||||
publish:
|
||||
if: startsWith(github.ref, 'refs/tags/')
|
||||
needs: build
|
||||
runs-on: ubuntu-24.04
|
||||
steps:
|
||||
- uses: actions/download-artifact@v4
|
||||
with:
|
||||
path: artifacts
|
||||
merge-multiple: true
|
||||
- name: Publish GitHub release
|
||||
env:
|
||||
GH_TOKEN: ${{ github.token }}
|
||||
run: gh release create "${GITHUB_REF_NAME}" artifacts/* --generate-notes --verify-tag
|
||||
Reference in new issue
Block a user