Skip to content

Build your personal knowledge base with Trilium Notes

chore(ci): customize shell per platform

Elian Dorand942daea9486
diff --git a/.github/actions/build-electron/action.yml b/.github/actions/build-electron/action.yml
index 4f8f0bea2e..5a355a2f72 100644
--- a/.github/actions/build-electron/action.yml
+++ b/.github/actions/build-electron/action.yml
@@ -11,6 +11,9 @@ inputs:
extension:
description: "Platform specific extensions to copy in the output: dmg, deb, rpm, exe, zip"
required: true
+ shell:
+ description: "Which shell to use"
+ required: true
forge_platform:
required: true
@@ -40,21 +43,21 @@ runs:
- name: Verify certificates
if: inputs.os == 'macos'
- shell: cmd
+ shell: ${{ inputs.shell }}
run: |
echo "Available signing identities:"
security find-identity -v -p codesigning build.keychain
- name: Set up Python and other macOS dependencies
if: ${{ inputs.os == 'macos' }}
- shell: cmd
+ shell: ${{ inputs.shell }}
run: |
brew install python-setuptools
brew install create-dmg
- name: Install dependencies for RPM and Flatpak package building
if: ${{ inputs.os == 'linux' }}
- shell: cmd
+ shell: ${{ inputs.shell }}
run: |
sudo apt-get update && sudo apt-get install rpm flatpak-builder elfutils
flatpak remote-add --user --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo
@@ -64,16 +67,16 @@ runs:
# Build setup
- name: Install dependencies
- shell: cmd
+ shell: ${{ inputs.shell }}
run: npm ci
- name: Update build info
- shell: cmd
+ shell: ${{ inputs.shell }}
run: npm run chore:update-build-info
# Critical debugging configuration
- name: Run electron-forge build with enhanced logging
- shell: cmd
+ shell: ${{ inputs.shell }}
env:
# Pass through required environment variables for signing and notarization
APPLE_TEAM_ID: ${{ env.APPLE_TEAM_ID }}
@@ -88,7 +91,7 @@ runs:
# Add DMG signing step
- name: Sign DMG
if: inputs.os == 'macos'
- shell: cmd
+ shell: ${{ inputs.shell }}
run: |
echo "Signing DMG file..."
dmg_file=$(find ./dist -name "*.dmg" -print -quit)
@@ -113,7 +116,7 @@ runs:
- name: Verify code signing
if: inputs.os == 'macos'
- shell: cmd
+ shell: ${{ inputs.shell }}
run: |
echo "Verifying code signing for all artifacts..."
diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml
index 1acdf4709f..4479d8f07e 100644
--- a/.github/workflows/main.yml
+++ b/.github/workflows/main.yml
@@ -24,12 +24,15 @@ jobs:
- name: macos
image: macos-latest
extension: [dmg, zip]
+ shell: bash
- name: linux
image: ubuntu-latest
extension: [deb, rpm, zip, flatpak]
+ shell: bash
- name: windows
image: windows-latest
extension: [exe, zip]
+ shell: cmd
runs-on: ${{ matrix.os.image }}
steps:
- uses: actions/checkout@v4
@@ -43,6 +46,7 @@ jobs:
os: ${{ matrix.os.name }}
arch: ${{ matrix.arch }}
extension: ${{ matrix.os.extension }}
+ shell: ${{ matrix.os.shell }}
env:
APPLE_APP_CERTIFICATE_BASE64: ${{ secrets.APPLE_APP_CERTIFICATE_BASE64 }}
APPLE_APP_CERTIFICATE_PASSWORD: ${{ secrets.APPLE_APP_CERTIFICATE_PASSWORD }}
diff --git a/.github/workflows/nightly.yml b/.github/workflows/nightly.yml
index 1b947391f6..6c70d10460 100644
--- a/.github/workflows/nightly.yml
+++ b/.github/workflows/nightly.yml
@@ -25,6 +25,7 @@ jobs:
image: win-signing
extension: [exe, zip]
forge_platform: win32
+ shell: cmd
runs-on: ${{ matrix.os.image }}
steps:
- uses: actions/checkout@v4
@@ -42,6 +43,7 @@ jobs:
os: ${{ matrix.os.name }}
arch: ${{ matrix.arch }}
extension: ${{ join(matrix.os.extension, ' ') }}
+ shell: ${{ matrix.os.shell }}
env:
APPLE_APP_CERTIFICATE_BASE64: ${{ secrets.APPLE_APP_CERTIFICATE_BASE64 }}
APPLE_APP_CERTIFICATE_PASSWORD: ${{ secrets.APPLE_APP_CERTIFICATE_PASSWORD }}
diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml
index dc523893bb..dca1c1c083 100644
--- a/.github/workflows/release.yml
+++ b/.github/workflows/release.yml
@@ -21,12 +21,15 @@ jobs:
- name: macos
image: macos-latest
extension: [dmg, zip]
+ shell: bash
- name: linux
image: ubuntu-latest
extension: [deb, rpm, zip, flatpak]
+ shell: bash
- name: windows
image: windows-latest
extension: [exe, zip]
+ shell: cmd
runs-on: ${{ matrix.os.image }}
steps:
- uses: actions/checkout@v4
@@ -40,6 +43,7 @@ jobs:
os: ${{ matrix.os.name }}
arch: ${{ matrix.arch }}
extension: ${{ join(matrix.os.extension, ' ') }}
+ shell: ${{ matrix.os.shell }}
env:
APPLE_APP_CERTIFICATE_BASE64: ${{ secrets.APPLE_APP_CERTIFICATE_BASE64 }}
APPLE_APP_CERTIFICATE_PASSWORD: ${{ secrets.APPLE_APP_CERTIFICATE_PASSWORD }}