Skip to content

1.14.4

1.14.4 #108

Workflow file for this run

name: Release
on:
push:
tags:
- 'v*'
permissions:
# required to modify releases
contents: write
jobs:
release-linux:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
submodules: recursive
persist-credentials: false
- name: Install Node.js
uses: actions/setup-node@v4
with:
node-version: 22
- name: Install dependencies
run: npm ci --loglevel=info
- name: Fetch
run: npm run fetch
- name: Compile
run: npm run webpack:prod
- name: Package
run: |
node release-automation/build.js --debian --tarball --appimage --x64 --armv7l --arm64 --production
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Upload artifacts
uses: actions/upload-artifact@v4
with:
name: linux
path: |
dist/*.deb
dist/*.tar.gz
dist/*.AppImage
release-mac:
runs-on: macos-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
submodules: recursive
persist-credentials: false
- name: Install Node.js
uses: actions/setup-node@v4
with:
node-version: 22
- name: Install dependencies
run: npm ci --loglevel=info
- name: Fetch
run: npm run fetch
- name: Compile
run: npm run webpack:prod
- name: Package
run: |
# I don't trust GitHub Actions to not accidentally log shell substitutions somewhere, so we
# use Python instead of "echo $SECRET >" to write the private key to a file as needed by notarytool.
python3 -c "import os; open(os.getenv('APPLE_API_KEY_NAME'), 'w').write(os.getenv('APPLE_API_KEY_DATA'))" >/dev/null 2>&1
# @electron/notaraize documentation says key should be an absolute path
export APPLE_API_KEY="$(pwd)/$APPLE_API_KEY_NAME"
node release-automation/build.js --mac --universal --production
# These macOS versions never ran on an Apple Silicon device, so only need x64
node release-automation/build.js --mac-legacy-10.13-10.14 --mac-legacy-10.15 --x64 --production
# for safety
rm "$APPLE_API_KEY_NAME"
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
APPLE_API_ISSUER: ${{ secrets.APPLE_API_ISSUER }}
APPLE_API_KEY_ID: ${{ secrets.APPLE_API_KEY_ID }}
APPLE_API_KEY_NAME: ${{ secrets.APPLE_API_KEY_NAME }}
APPLE_API_KEY_DATA: ${{ secrets.APPLE_API_KEY_DATA }}
# base64 -i Certificates.p12
CSC_LINK: ${{ secrets.APPLE_CSC_LINK }}
# electron-builder documentation says password won't be escaped, so don't use any
# special characters that the shell will mess with
CSC_KEY_PASSWORD: ${{ secrets.APPLE_CSC_KEY_PASSWORD }}
- name: Upload artifacts
uses: actions/upload-artifact@v4
with:
name: mac
path: dist/*.dmg
release-windows:
# GitHub's Windows runners have a C: drive and a D: drive.
# C: is for the OS and has good read performance but awful write performance.
# D: has much better faster write performance (>20x faster than C:)
# We want to use the D: drive whenever we can. Trying to do "npm ci" on the C:
# drive has been observed to take over an hour!
runs-on: windows-latest
steps:
# actions/checkout can only clone to paths in $GITHUB_WORKSPACE which is on the C: drive,
# so we have to clone to C: then copy to D: after. This repository itself isn't huge so
# this is plenty fast.
- name: Checkout
uses: actions/checkout@v4
with:
submodules: recursive
persist-credentials: false
path: repo
- name: "Move repository to D: drive"
run: |
Copy-Item -Path repo -Destination D:\repo -Recurse
Remove-Item -Path repo -Recurse -Force
- name: Install Node.js
uses: actions/setup-node@v4
with:
node-version: 22
# The repository being on D: means that node_modules IO will be fast, but npm still downloads
# packages to a temporary folder for caching which is on C: by default. We need to make sure
# npm uses the D: drive instead otherwise we still get bottlenecked by C:.
- name: "Configure npm to use D: drive"
run: |
npm config set cache D:\npm-cache
npm config set prefix D:\npm-prefix
- name: Install dependencies
working-directory: D:\repo
run: npm ci --loglevel=info
- name: Fetch
working-directory: D:\repo
run: npm run fetch
- name: Compile
working-directory: D:\repo
run: npm run webpack:prod
- name: Package
working-directory: D:\repo
run: |
node release-automation/build.js --windows --microsoft-store --x64 --ia32 --arm64 --production
node release-automation/build.js --windows-portable --x64 --production
node release-automation/build.js --windows-legacy --ia32 --x64 --production
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Upload Microsoft Store Artifact
uses: actions/upload-artifact@v4
with:
name: appx
path: D:\repo\dist\*.appx