Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions .github/workflows/build-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,11 @@ jobs:
- platform: "macos-latest" # for Intel based macs.
args: "--target x86_64-apple-darwin"
target: "x86_64-apple-darwin"
- platform: "ubuntu-22.04"
args: ""
- platform: "ubuntu-22.04" # Build .deb on 22.04
args: "--bundles deb"
target: "x86_64-unknown-linux-gnu"
- platform: "ubuntu-24.04" # Build AppImage and RPM on 24.04
args: "--bundles appimage,rpm"
target: "x86_64-unknown-linux-gnu"
- platform: "windows-latest"
args: ""
Expand All @@ -31,4 +34,5 @@ jobs:
sign-binaries: true
asset-prefix: "handy-test"
upload-artifacts: true
is-debug-build: ${{ contains(matrix.args, '--debug') }}
secrets: inherit
53 changes: 45 additions & 8 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,10 @@ on:
required: false
type: string
default: "handy"
asset-name-pattern:
required: false
type: string
default: ""
upload-artifacts:
required: false
type: boolean
Expand All @@ -35,6 +39,10 @@ on:
required: false
type: string
default: ${{ github.ref }}
is-debug-build:
required: false
type: boolean
default: false

jobs:
build:
Expand All @@ -57,6 +65,18 @@ jobs:
echo "Application version from tauri.conf.json: $VERSION"
echo "version=$VERSION" >> "$GITHUB_OUTPUT"

- name: Determine build profile
id: build-profile
shell: bash
run: |
if [[ "${{ inputs.is-debug-build }}" == "true" ]]; then
echo "profile=debug" >> "$GITHUB_OUTPUT"
echo "Build profile: debug"
else
echo "profile=release" >> "$GITHUB_OUTPUT"
echo "Build profile: release"
fi

- uses: oven-sh/setup-bun@v2

- name: install Rust stable
Expand Down Expand Up @@ -149,6 +169,19 @@ jobs:
echo "CERT_ID=$CERT_ID" >> $GITHUB_ENV
echo "Certificate imported."

- name: Patch asset name pattern
id: patch-release-name
shell: bash
if: ${{ inputs.release-id != '' && inputs.asset-name-pattern != '' }}
run: |
platform="${{ inputs.platform }}"
replacement="$(echo ${platform} | sed -E 's/-latest//')"
patched_platform=$(echo '${{ inputs.asset-name-pattern }}' | sed -E "s/\[platform\]/${replacement}/")
if [[ -n "${{ inputs.asset-prefix }}" ]]; then
patched_platform="${{ inputs.asset-prefix }}_${patched_platform}"
fi
echo "platform=${patched_platform}" >> $GITHUB_OUTPUT

- name: Build with Tauri
uses: tauri-apps/tauri-action@v0
env:
Expand All @@ -165,10 +198,13 @@ jobs:
AZURE_TENANT_ID: ${{ inputs.sign-binaries && secrets.AZURE_TENANT_ID || '' }}
TAURI_SIGNING_PRIVATE_KEY: ${{ inputs.sign-binaries && secrets.TAURI_SIGNING_PRIVATE_KEY || '' }}
TAURI_SIGNING_PRIVATE_KEY_PASSWORD: ${{ inputs.sign-binaries && secrets.TAURI_SIGNING_PRIVATE_KEY_PASSWORD || '' }}
WHISPER_NO_AVX: ${{ contains(inputs.platform, 'ubuntu') && 'ON' || '' }}
WHISPER_NO_AVX2: ${{ contains(inputs.platform, 'ubuntu') && 'ON' || '' }}
with:
tagName: ${{ inputs.release-id && format('v{0}', steps.get-version.outputs.version) || '' }}
releaseName: ${{ inputs.release-id && format('v{0}', steps.get-version.outputs.version) || '' }}
releaseId: ${{ inputs.release-id }}
assetNamePattern: ${{ steps.patch-release-name.outputs.platform }}
args: ${{ inputs.build-args }}

- name: Upload artifacts (macOS)
Expand All @@ -177,8 +213,8 @@ jobs:
with:
name: ${{ inputs.asset-prefix }}-${{ inputs.target }}
path: |
src-tauri/target/${{ inputs.target }}/release/bundle/dmg/*.dmg
src-tauri/target/${{ inputs.target }}/release/bundle/macos/*.app
src-tauri/target/${{ inputs.target }}/${{ steps.build-profile.outputs.profile }}/bundle/dmg/*.dmg
src-tauri/target/${{ inputs.target }}/${{ steps.build-profile.outputs.profile }}/bundle/macos/*.app
retention-days: 30

- name: Install FUSE for AppImage processing
Expand All @@ -191,7 +227,7 @@ jobs:
if: contains(inputs.platform, 'ubuntu')
run: |
# Find the AppImage file
APPIMAGE_PATH=$(find src-tauri/target/release/bundle/appimage -name "*.AppImage" | head -1)
APPIMAGE_PATH=$(find src-tauri/target/${{ steps.build-profile.outputs.profile }}/bundle/appimage -name "*.AppImage" | head -1)

if [ -n "$APPIMAGE_PATH" ]; then
echo "Processing AppImage: $APPIMAGE_PATH"
Expand Down Expand Up @@ -236,10 +272,11 @@ jobs:
if: inputs.upload-artifacts && contains(inputs.platform, 'ubuntu')
uses: actions/upload-artifact@v4
with:
name: ${{ inputs.asset-prefix }}-${{ inputs.target }}
name: ${{ inputs.asset-prefix }}-${{ inputs.platform }}-${{ inputs.target }}
path: |
src-tauri/target/release/bundle/deb/*.deb
src-tauri/target/release/bundle/appimage/*.AppImage
src-tauri/target/${{ steps.build-profile.outputs.profile }}/bundle/deb/*.deb
src-tauri/target/${{ steps.build-profile.outputs.profile }}/bundle/appimage/*.AppImage
src-tauri/target/${{ steps.build-profile.outputs.profile }}/bundle/rpm/*.rpm
retention-days: 30

- name: Upload artifacts (Windows)
Expand All @@ -248,6 +285,6 @@ jobs:
with:
name: ${{ inputs.asset-prefix }}-${{ inputs.target }}
path: |
src-tauri/target/release/bundle/msi/*.msi
src-tauri/target/release/bundle/nsis/*.exe
src-tauri/target/${{ steps.build-profile.outputs.profile }}/bundle/msi/*.msi
src-tauri/target/${{ steps.build-profile.outputs.profile }}/bundle/nsis/*.exe
retention-days: 30
7 changes: 5 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,11 @@ jobs:
- platform: "macos-latest" # for Intel based macs.
args: "--target x86_64-apple-darwin"
target: "x86_64-apple-darwin"
- platform: "ubuntu-22.04"
args: ""
- platform: "ubuntu-22.04" # Build .deb on 22.04
args: "--bundles deb"
target: "x86_64-unknown-linux-gnu"
- platform: "ubuntu-24.04" # Build AppImage and RPM on 24.04
args: "--bundles appimage,rpm"
target: "x86_64-unknown-linux-gnu"
- platform: "windows-latest"
args: ""
Expand Down
Loading
Loading