Skip to content

22.1.15 RC 1

22.1.15 RC 1 #158

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 }}
GH_REF: ${{ github.ref }}
steps:
- name: Checkout reposistory
uses: actions/checkout@v4
with:
submodules: false
- name: Remove drawio submodule
run: |
rm .gitmodules
rm -rf drawio
mkdir drawio
- name: Checkout drawio-dev
uses: actions/checkout@v4
with:
repository: jgraph/drawio-dev
token: ${{ secrets.GH_TOKEN }}
ref: release
path: drawio
submodules: false
- name: Get drawio Tag & Submodules
run: |
cd drawio
# Get the current build tag from draw.io
export tmp1=${GH_REF/refs\//}
export tmp2=${tmp1/\/v/\/diagramly-}
export tmp3=${tmp2//\./_}
git fetch origin refs/$tmp3:refs/$tmp3 --no-tags
git checkout $tmp3 -b tmp-deploy
# Get submodules of draw.io
git config --global --add safe.directory '*'
git submodule init
git config submodule.src/main/webapp/resources.url https://${{secrets.I18N_USERNAME}}:${{secrets.I18N_ACCESS_KEY}}@github.com/jgraph/drawio-i18n.git
git submodule update --init --recursive
- 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"
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 edge dist/draw.io-amd64-*.snap