Skip to content
This repository was archived by the owner on Aug 16, 2025. It is now read-only.

Commit b5c9ca8

Browse files
authored
ci: update release flow (#95)
* update ci * add upload on the build pr * add xattr -cr AppiumForMac.app * add note about xattr * tweak name * remove upload * add release section * Update release.yml * Update release.yml
1 parent 56c3a19 commit b5c9ca8

File tree

3 files changed

+28
-14
lines changed

3 files changed

+28
-14
lines changed

.github/workflows/build.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,10 @@ jobs:
1515
- uses: actions/checkout@v2
1616
- name: Run xcodebuild
1717
run: xcodebuild -scheme AppiumForMac -configuration Debug -derivedDataPath $GITHUB_WORKSPACE build
18-
- name: Archive the AppiumForMac.app
18+
- name: Archive the AppiumForMac.app without extended metadata
1919
run: |
2020
mv $GITHUB_WORKSPACE/Build/Products/Debug/AppiumForMac.app $GITHUB_WORKSPACE
21+
xattr -cr AppiumForMac.app
2122
zip -r Debug_AppiumForMac.zip AppiumForMac.app
2223
- name: Upload the AppiumForMac.app
2324
uses: actions/upload-artifact@v2

.github/workflows/release.yml

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,10 @@ jobs:
1414
- uses: actions/checkout@v2
1515
- name: Run xcodebuild
1616
run: xcodebuild -scheme AppiumForMac -configuration Debug -derivedDataPath $GITHUB_WORKSPACE build
17-
- name: Archive the AppiumForMac.app
17+
- name: Archive the AppiumForMac.app without extended metadata
1818
run: |
1919
mv $GITHUB_WORKSPACE/Build/Products/Debug/AppiumForMac.app $GITHUB_WORKSPACE
20+
xattr -cr AppiumForMac.app
2021
zip -r Debug_AppiumForMac.zip AppiumForMac.app
2122
- name: Create Release
2223
id: create_release
@@ -25,14 +26,11 @@ jobs:
2526
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Created by Actions automatically
2627
with:
2728
tag_name: ${{ github.ref }}
28-
release_name: Release ${{ github.ref }}
29-
body: |
30-
Changes in this Release
31-
- Release note
32-
draft: true
29+
release_name: ${{ github.ref }}
30+
draft: false
3331
prerelease: false
3432
- name: Upload Debug_AppiumForMac
35-
id: upload-release-asset
33+
id: upload-release-asset
3634
uses: actions/upload-release-asset@v1
3735
env:
3836
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

README.md

Lines changed: 21 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ The WebDriver server is on port 4622. If you build it yourself, you can change t
66

77
## Requirements
88
* Running: Mac OS X 10.7 or later.
9-
* Building: Xcode 7.2.1 or later.
9+
* Building: Xcode 7.2.1 or later.
1010

1111
## Installation
1212
Mac OS X does not allow an application to use the Accessibility API without permission, so you have to enable it manually.
@@ -33,6 +33,21 @@ Newer macOS requires 64 bit binary.
3333
You can build this repository manually to match for your environment with Xcode.
3434
Then, please copy `AppiumForMac.app` in `/Users/<username>/Library/Developer/Xcode/DerivedData/AppiumForMac-xxxxxxxx/Build/Products/Debug/AppiumForMac.app` to `/Applications`.
3535

36+
## Release
37+
38+
Please push a tag with `v` prefix like `v0.5.0`.
39+
Then, a GitHub Actions will push a new `AppiumForMac.app` as the version as a draft on [Release page](https://github.com/appium/appium-for-mac/releases).
40+
Once you convert the draft to publish, the tag will appear on the release page.
41+
42+
### Download binaries built on CI
43+
44+
[Release page](https://github.com/appium/appium-for-mac/releases) provides `AppiumForMac.app` for each tag.
45+
You also can get the latest `AppiumForMac.app` on each PR.
46+
47+
If you could not start `AppiumForMac.app` by security limitation by macOS,
48+
please try out `xattr -cr /path/to/AppiumForMac.app` command once to remove extende attributes on macOS.
49+
Then, you probably open the `AppiumForMac.app` without error.
50+
3651
## New Features For Scripters (as of April 2017)
3752

3853
You can see the new features in the calculator.py example script.
@@ -116,7 +131,7 @@ Bad examples:
116131

117132

118133
### Automatic AXPath Recording
119-
Generating an AXPath for an element is easy: while AppiumForMac is running, just use the mouse to point to an element, then press the fn (function) key for a couple of seconds. AppiumForMac will build the AXPath of the element on screen, and copy it to the clipboard. You can then paste it into your script.
134+
Generating an AXPath for an element is easy: while AppiumForMac is running, just use the mouse to point to an element, then press the fn (function) key for a couple of seconds. AppiumForMac will build the AXPath of the element on screen, and copy it to the clipboard. You can then paste it into your script.
120135

121136
### Session Kill Switch
122137
If your script has gone off the rails, you need to stop it. But if a script is running, it can keep typing and clicking as you try to cancel it. Now, while a session is in progress, you can press the fn (function) key for a couple of seconds. AppiumForMac will cancel any open sessions. Your script will receive a "no such session" error.
@@ -127,19 +142,19 @@ AppiumForMac sessions have several new properties. See below for a description o
127142
#### Getting and Setting Properties with a Cookie
128143
Each cookie is a dictionary with at least two keys: 'name' and 'value'. The Selenium commands are: get_cookies, get_cookie(), and addCookie().
129144

130-
1. To get all cookies, use driver.get_cookies(). This will return an array of cookie dictionaries.
145+
1. To get all cookies, use driver.get_cookies(). This will return an array of cookie dictionaries.
131146
1. To get one cookie, use driver.get_cookie('cookieName'). This will return the cookie with the name 'cookieName'.
132147
1. To set a cookie, use driver.add_cookie({'name': 'cookieName', 'value': 'cookieValue'}).
133148

134149
#### Implicit Timeouts
135150
AppiumForMac supports standard implicit timeouts when finding an element. The default is 0.0 seconds, that is, there will be only one attempt.
136151

137-
For example, to set a 20.5 second timeout, use driver.add_cookie({'name': 'implicit_timeout', 'value': 20.5}).
152+
For example, to set a 20.5 second timeout, use driver.add_cookie({'name': 'implicit_timeout', 'value': 20.5}).
138153

139154
#### Loop Delay
140155
During an implicit timeout to find an element, you can specify how long to wait between attempts. The default is 1.0 seconds. The loop delay occurs _after_ each attempt, so if the element is found on the first attempt, there will be no delay. The total waiting time will not exceed implicit_timeout, regardless of the loop_delay value.
141156

142-
For example, to set a 1.7 second loop delay, use driver.add_cookie({'name': 'loop_delay', 'value': 1.7}).
157+
For example, to set a 1.7 second loop delay, use driver.add_cookie({'name': 'loop_delay', 'value': 1.7}).
143158

144159
#### Command Delay
145160
This provides a simple way to slow down a script if needed, e.g. for debugging. It specifies an arbitrary delay _before_ each command. The default is 0.0 seconds so your script runs at full speed!
@@ -176,7 +191,7 @@ The name of each handler is dynamically constructed from the http request. All y
176191
#### Creating a new command handler
177192

178193
1. Go to AfMHandlers.m.
179-
1. Find an existing handler method. You might want to find one that is similar to the new command you want to add.
194+
1. Find an existing handler method. You might want to find one that is similar to the new command you want to add.
180195
1. Copy the handler method to the clipboard.
181196
1. Find the commented out stub for the new handler method and paste at that location.
182197
1. Rename your new handler, following the naming pattern for the other handlers.

0 commit comments

Comments
 (0)