20.6.0 RC #157
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: Electron Builder CI | |
on: | |
push: | |
tags: | |
- 'v*' | |
jobs: | |
build: | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
os: [ubuntu-18.04, macos-latest] | |
env: | |
CC: clang | |
CXX: clang++ | |
npm_config_clang: 1 | |
APPLEID: ${{ secrets.APPLEID }} | |
APPLEIDPASS: ${{ secrets.APPLEIDPASS }} | |
CSC_KEY_PASSWORD: ${{ secrets.CSC_KEY_PASSWORD }} | |
CSC_LINK: ${{ secrets.CSC_LINK }} | |
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
SNAP_TOKEN: ${{ secrets.SNAP_TOKEN }} | |
OS_NAME: ${{ matrix.os }} | |
steps: | |
- name: Checkout reposistory | |
uses: actions/checkout@v2 | |
- name: Installing Node | |
uses: actions/setup-node@v2 | |
with: | |
node-version: 14 | |
- name: Build for ${{ matrix.os}} | |
run: | | |
if [ "$OS_NAME" = "ubuntu-18.04" ]; then sudo apt-get update && sudo apt-get install -y libgnome-keyring-dev 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/git@github.com:/https:\/\/github.com\//' .gitmodules | |
git submodule update --init --recursive | |
sudo npm install -g yarn | |
yarn install | |
if [ "$OS_NAME" = "ubuntu-18.04" ]; 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-18.04' }} | |
run: | | |
#To generate SNAP_TOKEN run `snapcraft export-login [FILE]` and login with your snapcraft credentials. Then encode as base64 | |
echo $SNAP_TOKEN | base64 -d > /tmp/login_token_file | |
sudo snap install snapcraft --classic | |
snapcraft login --with /tmp/login_token_file | |
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 |