Skip to content

22.1.15 RC 1

22.1.15 RC 1 #153

name: Electron Builder CI (WIN)
on:
push:
tags:
- 'v*'
jobs:
build:
runs-on: windows-latest
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GH_REF: ${{ github.ref }}
steps:
- name: Checkout reposistory
uses: actions/checkout@v4
with:
submodules: false
- name: Remove drawio submodule
shell: powershell #The default shell for Windows
run: |
Remove-Item '.gitmodules'
Remove-Item 'drawio' -Recurse
md 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
$tmp=$Env:GH_REF -replace '/v','/diagramly-' -replace '[.]','_'
$ref=$tmp+':'+$tmp
git fetch origin $ref --no-tags
$tmp=$tmp -replace 'refs/',''
git checkout $tmp -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: Prepare for Windows Build
shell: powershell #The default shell for Windows
run: |
npm install -g yarn
yarn install
- name: Build for Windows (x32)
env:
CSC_LINK: ${{ secrets.WIN_CSC_LINK }}
CSC_KEY_PASSWORD: ${{ secrets.WIN_CSC_KEY_PASSWORD }}
shell: powershell #The default shell for Windows
run: |
#Disable auto-update and build 32bit first such that latest.yml is for 64bit only (64bit will overwrite 32bit one)
yarn run sync disableUpdate
yarn run release-win32
- name: Build for Windows (x64)
env:
CSC_LINK: ${{ secrets.WIN_CSC_LINK }}
CSC_KEY_PASSWORD: ${{ secrets.WIN_CSC_KEY_PASSWORD }}
shell: powershell #The default shell for Windows
run: |
#Enable auto-update again
yarn run sync
yarn run release-win
- name: Build for Windows (APPX)
shell: powershell #The default shell for Windows
run: |
#Disable auto-update for appx also
yarn run sync disableUpdate
yarn run release-appx