Umami Build #139
Workflow file for this run
This file contains 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
name: Build packages | |
on: | |
release: | |
types: [published] | |
jobs: | |
build: | |
strategy: | |
matrix: | |
os: [windows-latest, ubuntu-latest, macos-latest] | |
include: | |
- os: windows-latest | |
electron_cmd: win | |
package_glob: dist/*.exe | |
- os: ubuntu-latest | |
electron_cmd: linux | |
package_glob: | | |
dist/*.deb | |
dist/*.rpm | |
- os: macos-latest | |
electron_cmd: mac | |
package_glob: dist/*.dmg | |
runs-on: ${{ matrix.os }} | |
env: | |
NODE_OPTIONS: "--max_old_space_size=4096" | |
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Setup yarn 3.x | |
run: | | |
corepack enable | |
yarn set version 3.5.0 | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: 18.15.x | |
cache: "yarn" | |
- name: Install packages | |
run: yarn install --immutable | |
- name: Build | |
run: yarn build | |
- name: Package the electron app MacOS | |
if: matrix.os == 'macos-latest' | |
env: | |
CSC_KEY_PASSWORD: ${{ secrets.APPLE_CERTIFICATE_PASSWORD }} | |
CSC_LINK: certificate.p12 | |
APPLEID: ${{ secrets.APPLE_NOTARIZE_APPLEID }} | |
APPLEIDPASS: ${{ secrets.APPLE_NOTARIZE_PASSWORD }} | |
run: | | |
echo "${{ secrets.APPLE_CERTIFICATE_P12 }}" | base64 -d -o certificate.p12 | |
yarn electron:package:mac | |
- name: Package the electron app Linux | |
if: matrix.os == 'ubuntu-latest' | |
run: | | |
sudo apt-get install -y rpm | |
yarn electron:package:linux | |
- name: Package the electron app Windows | |
if: matrix.os == 'windows-latest' | |
run: yarn electron:package:win | |
- name: Upload | |
uses: actions/upload-artifact@v4 | |
with: | |
name: app_dist_${{ matrix.electron_cmd }} | |
path: ${{ matrix.package_glob }} | |
if-no-files-found: error |