Skip to content

21.6.8 RC 1

21.6.8 RC 1 #147

name: Electron Builder CI
on:
push:
tags:
- 'v*'
jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, macos-latest]
env:
CC: clang
CXX: clang++
npm_config_clang: 1
APPLEID: ${{ secrets.APPLEID }}
APPLEIDPASS: ${{ secrets.APPLEIDPASS }}
APPLE_TEAM_ID: ${{ secrets.APPLE_TEAM_ID }}
CSC_KEY_PASSWORD: ${{ secrets.CSC_KEY_PASSWORD }}
CSC_LINK: ${{ secrets.CSC_LINK }}
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SNAPCRAFT_STORE_CREDENTIALS: ${{ secrets.SNAP_TOKEN }}
OS_NAME: ${{ matrix.os }}
steps:
- name: Checkout reposistory
uses: actions/checkout@v3
- name: Installing Node
uses: actions/setup-node@v3
with:
node-version: 16
- name: Build for ${{ matrix.os}}
run: |
if [ "$OS_NAME" = "ubuntu-latest" ]; then sudo apt-get update && sudo apt-get install -y icnsutils graphicsmagick xz-utils rpm; fi
curl -o- -L https://yarnpkg.com/install.sh | bash
export PATH="$HOME/.yarn/bin:$PATH"
# Use sed to replace the SSH URL with the public URL, then initialize submodules
sed -ie 's/[email protected]:/https:\/\/github.com\//' .gitmodules
git submodule update --init --recursive
sudo npm install -g yarn
yarn install
if [ "$OS_NAME" = "ubuntu-latest" ]; then sed -ie 's/"asar": true,/"asar": true,\n"productName": "drawio",/' electron-builder-linux-mac.json; fi
yarn run sync
yarn run release-linux
- name: Build for Snap
if: ${{ matrix.os == 'ubuntu-latest' }}
run: |
#To generate SNAP_TOKEN run `snapcraft export-login [FILE]` and login with your snapcraft credentials. It is used now without login
sudo snap install snapcraft --classic
yarn run release-snap
# Cannot configure electron-builder to publish to stable channel, so do it explicitly
snapcraft push --release stable dist/draw.io-amd64-*.snap