v0.0.17 #62
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: Publish release | |
on: | |
release: ~ | |
workflow_dispatch: ~ | |
jobs: | |
build: | |
strategy: | |
matrix: | |
os: [ubuntu-latest, windows-latest, macos-13, macos-14] | |
runs-on: ${{ matrix.os }} | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Install Node.js | |
uses: actions/setup-node@v4 | |
with: | |
node-version: 20 | |
- name: enable corepack | |
run: corepack enable | |
- name: Install dependencies | |
run: yarn install --immutable | |
# Follow https://docs.github.com/en/actions/deployment/deploying-xcode-applications/installing-an-apple-certificate-on-macos-runners-for-xcode-development | |
# to sign the application. | |
# You can create: | |
# The "Developer ID Application" certificate here: https://developer.apple.com/account/resources/certificates/list | |
# The provision profile and certificate here: https://developer.apple.com/account/resources/profiles/list | |
- name: Install the Apple certificate and provisioning profile | |
if: startsWith(matrix.os, 'macos') | |
env: | |
BUILD_CERTIFICATE_BASE64: ${{ secrets.APPLE_BUILD_CERTIFICATE_BASE64 }} | |
P12_PASSWORD: ${{ secrets.APPLE_P12_PASSWORD }} | |
BUILD_PROVISION_PROFILE_BASE64: ${{ secrets.APPLE_BUILD_PROVISION_PROFILE_BASE64 }} | |
KEYCHAIN_PASSWORD: ${{ secrets.APPLE_KEYCHAIN_PASSWORD }} | |
run: | | |
# create variables | |
CERTIFICATE_PATH=$RUNNER_TEMP/build_certificate.p12 | |
PP_PATH=$RUNNER_TEMP/build_pp.provisionprofile | |
KEYCHAIN_PATH=$RUNNER_TEMP/app-signing.keychain-db | |
# import certificate and provisioning profile from secrets | |
echo -n "$BUILD_CERTIFICATE_BASE64" | base64 --decode -o $CERTIFICATE_PATH | |
echo -n "$BUILD_PROVISION_PROFILE_BASE64" | base64 --decode -o $PP_PATH | |
# create temporary keychain | |
security create-keychain -p "$KEYCHAIN_PASSWORD" $KEYCHAIN_PATH | |
security set-keychain-settings -lut 21600 $KEYCHAIN_PATH | |
security unlock-keychain -p "$KEYCHAIN_PASSWORD" $KEYCHAIN_PATH | |
# import certificate to keychain | |
security import $CERTIFICATE_PATH -P "$P12_PASSWORD" -A -t cert -f pkcs12 -k $KEYCHAIN_PATH | |
security set-key-partition-list -S apple-tool:,apple: -k "$KEYCHAIN_PASSWORD" $KEYCHAIN_PATH | |
security list-keychain -d user -s $KEYCHAIN_PATH | |
# apply provisioning profile | |
mkdir -p ~/Library/MobileDevice/Provisioning\ Profiles | |
cp $PP_PATH ~/Library/MobileDevice/Provisioning\ Profiles | |
- name: 'electron packager: do not be quiet !' # See https://github.com/electron/forge/issues/3540 | |
run: mv node_modules/@electron-forge/core/dist/api/package.js node_modules/@electron-forge/core/dist/api/package.quiet.js && sed 's/packageOpts.quiet = true/packageOpts.quiet = false/' node_modules/@electron-forge/core/dist/api/package.quiet.js > node_modules/@electron-forge/core/dist/api/package.js | |
# Issue with max opened file on arm macos | |
- name: 'change ulimit for arm macos' | |
if: startsWith(matrix.os, 'macos-14') | |
run: ulimit -n 999999 | |
# Issue with max opened file on arm macos | |
- name: 'change launchctl limit for arm macos' | |
if: startsWith(matrix.os, 'macos-14') | |
run: sudo launchctl limit maxfiles 999999 999999 | |
- name: Sign & Publish Electron app | |
run: yarn publish | |
env: | |
# MacOS sign specific | |
APPLE_SIGN_ID: ${{ secrets.APPLE_SIGN_ID }} | |
APPLE_ID: ${{ secrets.APPLE_ID }} | |
APPLE_APP_PASSWORD: ${{ secrets.APPLE_APP_PASSWORD }} | |
APPLE_TEAM_ID: ${{ secrets.APPLE_TEAM_ID }} | |
# For every platform | |
GITHUB_TOKEN: ${{ github.token }} |