Update dependencies #619
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# SPDX-FileCopyrightText: Simon Schneegans <[email protected]> | |
# SPDX-License-Identifier: CC0-1.0 | |
name: Test Deploy | |
on: | |
pull_request: | |
types: [opened, reopened, synchronize] | |
workflow_dispatch: | |
permissions: | |
contents: read | |
jobs: | |
linux: | |
name: Linux | |
strategy: | |
matrix: | |
os: [ubuntu-24.04, ubuntu-24.04-arm] | |
runs-on: ${{ matrix.os }} | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/[email protected] | |
with: | |
node-version-file: .node-version | |
- name: Install Dependencies | |
run: | | |
sudo apt update | |
sudo apt install -y libx11-dev libxtst-dev libwayland-dev libxkbcommon-dev flatpak-builder | |
npm install | |
- name: Fix Permissions | |
# Workaround for https://github.com/electron/electron/issues/17972 | |
run: | | |
sudo chmod 4755 node_modules/electron/dist/chrome-sandbox | |
sudo chown root node_modules/electron/dist/chrome-sandbox | |
- name: Create Packages | |
run: | | |
npm run make | |
- name: Create AppImage | |
run: | | |
tools/make-app-image.sh | |
- name: Create Flatpak bundle | |
run: | | |
sudo flatpak remote-add flathub https://flathub.org/repo/flathub.flatpakrepo | |
sudo tools/make-flatpak-bundle.sh | |
- name: Upload Artifacts | |
uses: actions/upload-artifact@v4 | |
with: | |
name: build-${{ matrix.os }} | |
path: out/make/**/* | |
retention-days: 7 | |
windows: | |
name: Windows | |
strategy: | |
matrix: | |
os: [windows-2022, windows-11-arm] | |
runs-on: ${{ matrix.os }} | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/[email protected] | |
with: | |
node-version-file: .node-version | |
- name: Install Dependencies | |
run: | | |
npm install | |
- name: Create Release | |
run: | | |
npm run make | |
- name: Rename Executables | |
shell: pwsh | |
env: | |
MATRIX_OS: ${{ matrix.os }} | |
run: | | |
if ($env:MATRIX_OS -eq "windows-2022") { | |
Get-ChildItem -Path out/make/squirrel.windows/*/*.exe | Rename-Item -NewName { $_.BaseName + "-x64" + $_.Extension } | |
} elseif ($env:MATRIX_OS -eq "windows-11-arm") { | |
Get-ChildItem -Path out/make/squirrel.windows/*/*.exe | Rename-Item -NewName { $_.BaseName + "-arm64" + $_.Extension } | |
} | |
- name: Upload Artifacts | |
uses: actions/upload-artifact@v4 | |
with: | |
name: build-${{ matrix.os }} | |
path: | | |
out/make/zip/win32/*/* | |
out/make/squirrel.windows/*/*.exe | |
retention-days: 7 | |
macos: | |
name: macOS | |
strategy: | |
matrix: | |
os: [macos-13, macos-14] | |
runs-on: ${{ matrix.os }} | |
steps: | |
# https://github.com/electron/forge/issues/2807 | |
- run: python3 -m pip install setuptools --break-system-packages | |
- uses: actions/checkout@v4 | |
- uses: actions/[email protected] | |
with: | |
node-version-file: .node-version | |
- name: Install Dependencies | |
run: | | |
npm install | |
npm install appdmg | |
- name: Add macOS certificates | |
if: ${{ ! github.event.pull_request.head.repo.fork && github.actor != 'dependabot[bot]' }} | |
env: | |
OSX_CERTIFICATE: ${{ secrets.OSX_CERTIFICATE }} | |
OSX_CERTIFICATE_PASSWORD: ${{ secrets.OSX_CERTIFICATE_PASSWORD }} | |
run: | | |
.github/osx_certificates.sh | |
- name: Create Release | |
env: | |
KANDO_OSX_SIGN: ${{ ! github.event.pull_request.head.repo.fork && github.actor != 'dependabot[bot]' }} | |
KANDO_OSX_NOTARIZE: ${{ ! github.event.pull_request.head.repo.fork && github.actor != 'dependabot[bot]' }} | |
OSX_APP_SPECIFIC_ID: ${{ secrets.OSX_APP_SPECIFIC_ID }} | |
OSX_APP_SPECIFIC_PASSWORD: ${{ secrets.OSX_APP_SPECIFIC_PASSWORD }} | |
OSX_TEAM_ID: ${{ secrets.OSX_TEAM_ID }} | |
run: | | |
npm run make | |
- name: Upload Artifacts | |
uses: actions/upload-artifact@v4 | |
with: | |
name: build-${{ matrix.os }} | |
path: | | |
out/make/*.dmg | |
out/make/zip/darwin/**/*.zip | |
retention-days: 7 |