Skip to content

fix: remove unused handle from RGB #323

fix: remove unused handle from RGB

fix: remove unused handle from RGB #323

Workflow file for this run

name: Electron/make
on:
push:
branches:
- main
pull_request:
branches:
- main
# TODO: might need to add `distutils` to the python version
# when `Preparing native dependencies: node-gyp` error occurs
# https://stackoverflow.com/questions/77233855/why-did-i-get-an-error-modulenotfounderror-no-module-named-distutils
jobs:
make:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [macos-latest, ubuntu-latest, windows-latest]
steps:
- name: Install the Apple certificate
if: runner.os == 'macOS'
env:
MACOS_CERTIFICATE: ${{ secrets.MACOS_CERTIFICATE }}
MACOS_CERTIFICATE_PWD: ${{ secrets.MACOS_CERTIFICATE_PWD }}
KEYCHAIN_PASSWORD: ${{ secrets.KEYCHAIN_PASSWORD }}
run: |
# create variables
CERTIFICATE_PATH=$RUNNER_TEMP/build_certificate.p12
KEYCHAIN_PATH=$RUNNER_TEMP/app-signing.keychain-db
# import certificate
echo -n "$MACOS_CERTIFICATE" | base64 --decode -o $CERTIFICATE_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 "$MACOS_CERTIFICATE_PWD" -A -t cert -f pkcs12 -k $KEYCHAIN_PATH
security list-keychain -d user -s $KEYCHAIN_PATH
- name: Run security find-identity -v
if: runner.os == 'macOS'
run: security find-identity -v
- uses: actions/checkout@v4
- name: Cache node modules
uses: actions/cache@v4
with:
path: '**/node_modules'
key: ${{ runner.os }}-modules-${{ hashFiles('**/yarn.lock') }}
- uses: actions/setup-node@v4
with:
node-version: 20
- name: Enable corepack
run: corepack enable
- name: Install dependencies
run: yarn install
- name: Build packages
run: yarn build
- uses: actions/setup-python@v5
with:
# https://stackoverflow.com/a/78870850/4655177
# Required for `distutils` module
python-version: '3.10'
# https://localazy.com/blog/how-to-automatically-sign-macos-apps-using-github-actions
- name: Make application
run: yarn make
env:
APPLE_IDENTITY: ${{ vars.APPLE_IDENTITY }}
APPLE_ID: ${{ vars.APPLE_ID }}
APPLE_TEAM_ID: ${{ vars.APPLE_TEAM_ID }}
APPLE_PASSWORD: ${{ secrets.APPLE_PASSWORD }}
- name: Clean up keychain and provisioning profile
if: runner.os == 'macOS'
run: |
security delete-keychain $RUNNER_TEMP/app-signing.keychain-db