-
-
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.
Changed build GitHub action to use drawio-dev repo
- Loading branch information
1 parent
127c8fc
commit a63a70f
Showing
2 changed files
with
63 additions
and
8 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 |
---|---|---|
|
@@ -10,19 +10,47 @@ jobs: | |
runs-on: windows-latest | ||
env: | ||
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
GH_REF: ${{ github.ref }} | ||
steps: | ||
- name: Checkout reposistory | ||
uses: actions/checkout@v3 | ||
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: | | ||
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 | ||
- name: Build for Windows (x32) | ||
|
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 |
---|---|---|
|
@@ -23,9 +23,39 @@ jobs: | |
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@v3 | ||
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: | ||
|
@@ -35,9 +65,6 @@ jobs: | |
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" | ||
# 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 | ||
yarn install | ||
if [ "$OS_NAME" = "ubuntu-latest" ]; then sed -ie 's/"asar": true,/"asar": true,\n"productName": "drawio",/' electron-builder-linux-mac.json; fi | ||
|
a63a70f
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewed.