Skip to content

chore(deps-dev): bump electron from 20.3.9 to 22.3.25 #186

chore(deps-dev): bump electron from 20.3.9 to 22.3.25

chore(deps-dev): bump electron from 20.3.9 to 22.3.25 #186

name: Build and Provide artifacts
on:
workflow_dispatch:
push:
tags: ["v*.*.*"]
pull_request:
branches:
- main
jobs:
build-linux:
name: Build for Linux and Provide artifacts
runs-on: ubuntu-latest
if: false
steps:
- name: Checkout Repository
uses: actions/checkout@v3
- name: Setup Libindy
uses: ./.github/actions/setup-libindy
- name: Install dependencies
run: yarn install --frozen-lockfile
- name: Build for all platforms
run: yarn --cwd packages/siera-desktop make -p linux
- name: Upload artifacts
uses: actions/upload-artifact@v3
if: (github.event_name == 'push' && startsWith(github.ref, 'refs/tags/')) || github.event_name == 'workflow_dispatch'
with:
name: siera-desktop-linux
path: ./packages/siera-desktop/out/make/**/*.*
retention-days: 7
build-macos:
name: Build for MacOS and Provide artifacts
runs-on: macos-latest
strategy:
matrix:
arch: [x64, arm64]
env:
MACOS_BUILD_CERTIFICATE_BASE64: ${{ secrets.SIERA_MACOS_BUILD_CERTIFICATE_BASE64 }}
MACOS_P12_PASSWORD: ${{ secrets.SIERA_MACOS_P12_PASSWORD }}
MACOS_BUILD_PROVISION_PROFILE_BASE64: ${{ secrets.SIERA_MACOS_BUILD_PROVISION_PROFILE_BASE64 }}
MACOS_KEYCHAIN_PASSWORD: ${{ secrets.SIERA_MACOS_KEYCHAIN_PASSWORD }}
APPLE_API_KEY_BASE64: ${{ secrets.SIERA_APPLE_API_KEY_BASE64 }}
APPLE_API_KEY_ID: ${{ secrets.SIERA_APPLE_API_KEY_ID }}
APPLE_API_ISSUER: ${{ secrets.SIERA_APPLE_API_ISSUER }}
steps:
- name: Checkout Repository
uses: actions/checkout@v3
- name: Install the Apple certificate and provisioning profile
env:
CERTIFICATE_PATH: ${{ runner.temp }}/build_certificate.p12
PROVISION_PROFILE_PATH: ${{ runner.temp }}/build_pp.mobileprovision
KEYCHAIN_PATH: ${{ runner.temp }}/app-signing.keychain-db
run: |
# import certificate and provisioning profile from secrets
echo -n $MACOS_BUILD_CERTIFICATE_BASE64 | base64 --decode --output $CERTIFICATE_PATH
echo -n $MACOS_BUILD_PROVISION_PROFILE_BASE64 | base64 --decode --output $PROVISION_PROFILE_PATH
# create temporary keychain
security create-keychain -p $MACOS_KEYCHAIN_PASSWORD $KEYCHAIN_PATH
security set-keychain-settings -lut 21600 $KEYCHAIN_PATH
security unlock-keychain -p $MACOS_KEYCHAIN_PASSWORD $KEYCHAIN_PATH
# import certificate to keychain
security import $CERTIFICATE_PATH -P $MACOS_P12_PASSWORD -A -t cert -f pkcs12 -k $KEYCHAIN_PATH
security list-keychain -d user -s $KEYCHAIN_PATH
# apply provisioning profile
mkdir -p ~/Library/MobileDevice/Provisioning\ Profiles
cp $PROVISION_PROFILE_PATH ~/Library/MobileDevice/Provisioning\ Profiles
- name: Check code signing setup
run: security find-identity -p codesigning -v
- name: Setup libindy and libraries
run: |
brew install dylibbundler
sudo cp ./libs/${{ matrix.arch }}/* /usr/local/lib
- name: Change node version
uses: actions/setup-node@v3
with:
node-version: '18'
- name: Install dependencies
run: yarn install --frozen-lockfile
- name: Build for MacOS platform
env:
NODE_ENV: production
run: |
export APPLE_API_KEY_PATH=$RUNNER_TEMP/siera-apple-api-key.p8
echo -n "$APPLE_API_KEY_BASE64" | base64 --decode --output $APPLE_API_KEY_PATH
sudo spctl --master-disable
yarn --cwd packages/siera-desktop make -p darwin --arch ${{ matrix.arch }}
- name: Upload artifacts
uses: actions/upload-artifact@v3
if: (github.event_name == 'push' && startsWith(github.ref, 'refs/tags/')) || github.event_name == 'workflow_dispatch'
with:
name: siera-desktop-macos-${{ matrix.arch }}
path: ./packages/siera-desktop/out/make/**/*.*
retention-days: 7
release:
name: Create Github release from artifacts
runs-on: ubuntu-latest
needs:
- build-macos
#- build-linux
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/')
steps:
- name: Download built binaries
uses: actions/download-artifact@v3
- name: Release
uses: softprops/action-gh-release@v1
with:
draft: true
files: |
./**/*.deb
./**/*.exe
./**/*.nupkg
./**/*.rpm
./**/*.zip
./**/*.AppImage
./**/RELEASES