Skip to content

Commit ad0fffd

Browse files
committed
Trigger driver repo and update the latest server version published
1 parent eb59e47 commit ad0fffd

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

.github/workflows/publish.yml

+17
Original file line numberDiff line numberDiff line change
@@ -26,3 +26,20 @@ jobs:
2626
run: flutter pub get
2727
- name: Publish
2828
run: dart pub publish --force
29+
30+
- name: Update Flutter Driver with Version
31+
run: |
32+
TAG_NAME=$(curl -s "https://api.github.com/repos/AppiumTestDistribution/appium-flutter-server/tags" | grep -m 1 '"name"' | sed -E 's/.*"name": "([^"]+)".*/\1/')
33+
repo_owner="AppiumTestDistribution"
34+
repo_name="appium-flutter-integration-driver"
35+
event_type="server-update"
36+
service="Server to Driver"
37+
version=$TAG_NAME
38+
39+
curl -L \
40+
-X POST \
41+
-H "Accept: application/vnd.github+json" \
42+
-H "Authorization: Bearer ${{ secrets.PAT }}" \
43+
-H "X-GitHub-Api-Version: 2022-11-28" \
44+
https://api.github.com/repos/$repo_owner/$repo_name/dispatches \
45+
-d "{\"event_type\": \"$event_type\", \"client_payload\": {\"service\": \"$service\", \"version\": \"$version\", \"unit\": false, \"integration\": true}}"

0 commit comments

Comments
 (0)