Skip to content

Commit

Permalink
Merge commit '243f6607caa2c03b12794d25c964800aebc7ab2f'
Browse files Browse the repository at this point in the history
  • Loading branch information
davidjgraph committed Nov 14, 2020
2 parents 4fe1aa7 + 243f660 commit 3063871
Show file tree
Hide file tree
Showing 2 changed files with 87 additions and 0 deletions.
40 changes: 40 additions & 0 deletions .github/workflows/electron-builder-win.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: Electron Builder CI (WIN)

on:
push:
branches: #For testing
- master
tags:
- 'v*'

jobs:
build:
runs-on: windows-latest
steps:
- name: Checkout reposistory
uses: actions/checkout@v2
- name: Installing Node
uses: actions/setup-node@v1
with:
node-version: 10
- name: Build for Windows
shell: powershell #The default shell for Windows
run: |
git config --global core.autocrlf input
(gc .\.gitmodules) -replace '[email protected]:','https://github.com/' | Out-File -encoding ASCII .gitmodules
git submodule update --init --recursive
npm install -g yarn
yarn install
cd drawio/src/main/webapp
yarn install
cd ../..
yarn run sync
yarn run release-win
yarn run sync disableUpdate
yarn run release-appx
- name: Archive production appx
uses: actions/upload-artifact@v2
with:
name: electron-builder-appx
path: dist/*.appx
retention-days: 1
47 changes: 47 additions & 0 deletions .github/workflows/electron-builder.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
name: Electron Builder CI

on:
push:
branches: #For testing
- master
tags:
- 'v*'

jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, macos-latest]
env:
CC: clang
CXX: clang++
npm_config_clang: 1
SNAP_TOKEN: ${{ secrets.SNAP_TOKEN }}
OS_NAME: ${{ matrix.os }}
steps:
- name: Checkout reposistory
uses: actions/checkout@v2
- name: Installing Node
uses: actions/setup-node@v1
with:
node-version: 10
- name: Build for ${{ matrix.os}}
run: |
if [ "$OS_NAME" = "ubuntu-latest" ]; 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/[email protected]:/https:\/\/github.com\//' .gitmodules
git submodule update --init --recursive
sudo npm install -g yarn
#To generate SNAP_TOKEN run `snapcraft export-login [FILE]` and login with your snapcraft credentials
if [ "$OS_NAME" = "ubuntu-latest" ]; then echo $SNAP_TOKEN > /tmp/login_token_file; fi
yarn install
if [ "$OS_NAME" = "ubuntu-latest" ]; then sudo snap install snapcraft --classic; fi
if [ "$OS_NAME" = "ubuntu-latest" ]; then snapcraft login --with /tmp/login_token_file; fi
yarn run sync
yarn run release-linux
if [ "$OS_NAME" = "ubuntu-latest" ]; then yarn run release-snap; fi
# Cannot configure electron-builder to publish to stable channel, so do it explicitly
if [ "$OS_NAME" = "ubuntu-latest" ]; then snapcraft push --release stable dist/draw.io-amd64-*.snap; fi

0 comments on commit 3063871

Please sign in to comment.