-
-
Notifications
You must be signed in to change notification settings - Fork 5.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge commit '243f6607caa2c03b12794d25c964800aebc7ab2f'
- Loading branch information
Showing
2 changed files
with
87 additions
and
0 deletions.
There are no files selected for viewing
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
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 |
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
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 |