Skip to content

Commit

Permalink
ci: update electron-builder and Azure pipeline configurations (appium…
Browse files Browse the repository at this point in the history
…#1404)

* ci: update azure VM images

* ci: update Node for Azure

* ci: always publish in x64 and arm64

* ci: move electron-builder config into own file for clarity

* ci: remove electron-builder nsisWeb option
nsis-web target is not used

* ci: slightly adjust common package options

* ci: remove electron-build filepaths already included by default

* ci: use common artifact name format

* ci: omit repeating default paths to app icon

* ci: build separate artifacts for both mac architectures

* ci: add tar.gz target for Linux

* ci: add entitlements file for mac signing

* chore: fix syntax for Azure UseNode task
  • Loading branch information
eglitise authored Mar 28, 2024
1 parent f1e12a6 commit 505180c
Show file tree
Hide file tree
Showing 5 changed files with 65 additions and 86 deletions.
8 changes: 8 additions & 0 deletions build/entitlements.mac.plist
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>com.apple.security.cs.allow-jit</key>
<true/>
</dict>
</plist>
9 changes: 4 additions & 5 deletions ci-jobs/package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,16 +8,15 @@ jobs:
- template: templates/package.yml
parameters:
pool:
vmImage: 'macOS-12'
name: 'osx_package'
vmImage: 'macOS-latest'
name: 'macos_package'
- template: templates/package.yml
parameters:
pool:
vmImage: 'windows-2022'
vmImage: 'windows-latest'
name: 'windows_package'
buildScript: 'npx electron-builder build -w --ia32 --x64 --publish always'
- template: templates/package.yml
parameters:
pool:
vmImage: 'ubuntu-22.04'
vmImage: 'ubuntu-latest'
name: 'linux_package'
6 changes: 3 additions & 3 deletions ci-jobs/templates/package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ parameters:
pool: ''
xvfb: false
target: ''
buildScript: 'npx electron-builder build --publish always'
buildScript: 'npx electron-builder build --x64 --arm64 --publish always'
jobs:
- job: ${{parameters.name}}
pool: ${{parameters.pool}}
Expand All @@ -21,9 +21,9 @@ jobs:
steps:
- checkout: self
persistCredentials: true
- task: NodeTool@0
- task: UseNode@1
inputs:
versionSpec: '16.x'
version: '20.x'
- script: npm ci
displayName: Install dependencies
- script: npm run build
Expand Down
50 changes: 50 additions & 0 deletions electron-builder.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
{
"productName": "Appium Inspector",
"appId": "io.appium.inspector",
"asar": true,
"directories": {
"output": "release"
},
"files": ["dist/", "main.js", "main.js.map"],
"artifactName": "${productName}-${version}-${os}-${arch}.${ext}",
"fileAssociations": [
{
"ext": "appiumsession",
"name": "Appium Session",
"role": "Editor"
}
],
"mac": {
"category": "public.app-category.developer-tools"
},
"dmg": {
"contents": [
{
"x": 410,
"y": 150,
"type": "link",
"path": "/Applications"
},
{
"x": 130,
"y": 150,
"type": "file"
}
]
},
"win": {
"target": ["nsis", "zip"]
},
"nsis": {
"oneClick": false
},
"linux": {
"target": ["AppImage", "tar.gz"],
"category": "Development"
},
"publish": {
"provider": "github",
"owner": "appium",
"vPrefixedTagName": true
}
}
78 changes: 0 additions & 78 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -62,84 +62,6 @@
"printWidth": 100,
"singleQuote": true
},
"build": {
"productName": "Appium Inspector",
"appId": "io.appium.inspector",
"asar": true,
"directories": {
"output": "release"
},
"fileAssociations": [
{
"ext": "appiumsession",
"name": "Appium",
"role": "Editor",
"icon": "./build/icon.ico"
}
],
"mac": {
"category": "public.app-category.developer-tools",
"target": [
{
"target": "dmg",
"arch": "universal"
},
{
"target": "zip",
"arch": "universal"
}
]
},
"dmg": {
"artifactName": "${productName}-mac-${version}.${ext}",
"contents": [
{
"x": 410,
"y": 150,
"type": "link",
"path": "/Applications"
},
{
"x": 130,
"y": 150,
"type": "file"
}
]
},
"files": [
"dist/",
"node_modules/**/*",
"main.js",
"main.js.map",
"package.json"
],
"win": {
"artifactName": "${productName}-windows-${version}-${arch}.${ext}",
"target": [
"nsis",
"zip"
],
"icon": "build/icon.ico"
},
"nsisWeb": {
"oneClick": false
},
"nsis": {
"oneClick": false
},
"linux": {
"artifactName": "${productName}-linux-${version}.${ext}",
"target": [
"AppImage"
],
"category": "Development"
},
"publish": {
"provider": "github",
"owner": "appium",
"vPrefixedTagName": true
}
},
"bin": {
"electron": "./node_modules/.bin/electron"
},
Expand Down

0 comments on commit 505180c

Please sign in to comment.