forked from facebookarchive/WebDriverAgent
-
Notifications
You must be signed in to change notification settings - Fork 390
76 lines (68 loc) · 2.59 KB
/
publish.js.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
# This workflow will do a clean install of node dependencies, build the source code and run tests across different versions of node
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions
name: Release
on:
workflow_dispatch:
push:
branches: [ master ]
jobs:
build:
runs-on: macos-13
env:
XCODE_VERSION: 14.3.1
ZIP_PKG_NAME_IOS: "WebDriverAgentRunner-Runner.zip"
PKG_PATH_IOS: "appium_wda_ios"
ZIP_PKG_NAME_TVOS: "WebDriverAgentRunner_tvOS-Runner.zip"
PKG_PATH_TVOS: "appium_wda_tvos"
steps:
- uses: actions/checkout@v2
- name: Use Node.js
uses: actions/setup-node@v3
with:
node-version: lts/*
- uses: maxim-lobanov/setup-xcode@v1
with:
xcode-version: "${{ env.XCODE_VERSION }}"
- run: npm install --no-package-lock
name: Install dev dependencies
- run: npm run build
name: Run build
- run: npm run test
name: Run test
# building WDA packages
- name: Build iOS
run: |
xcodebuild clean build-for-testing \
-project WebDriverAgent.xcodeproj \
-derivedDataPath $PKG_PATH_IOS \
-scheme WebDriverAgentRunner \
-destination generic/platform=iOS \
CODE_SIGNING_ALLOWED=NO ARCHS=arm64
- name: Creating a zip of WebDriverAgentRunner-Runner.app for iOS after removing test frameworks
run: |
pushd appium_wda_ios/Build/Products/Debug-iphoneos
rm -rf WebDriverAgentRunner-Runner.app/Frameworks/XC*.framework
zip -r $ZIP_PKG_NAME_IOS WebDriverAgentRunner-Runner.app
popd
mv $PKG_PATH_IOS/Build/Products/Debug-iphoneos/$ZIP_PKG_NAME_IOS ./
- name: Build tvOS
run: |
xcodebuild clean build-for-testing \
-project WebDriverAgent.xcodeproj \
-derivedDataPath $PKG_PATH_TVOS \
-scheme WebDriverAgentRunner_tvOS \
-destination generic/platform=tvOS \
CODE_SIGNING_ALLOWED=NO ARCHS=arm64
- name: Creating a zip of WebDriverAgentRunner-Runner.app for tvOS after removing test frameworks
run: |
pushd appium_wda_tvos/Build/Products/Debug-appletvos
rm -rf WebDriverAgentRunner_tvOS-Runner.app/Frameworks/XC*.framework
zip -r $ZIP_PKG_NAME_TVOS WebDriverAgentRunner_tvOS-Runner.app
popd
mv $PKG_PATH_TVOS/Build/Products/Debug-appletvos/$ZIP_PKG_NAME_TVOS ./
# release tasks
- run: npx semantic-release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
name: Release