Skip to content

Commit ec2071a

Browse files
authored
Adding github workflow to create a PR to the checkout sdk (#9)
Co-authored-by: Alex Guretzki <[email protected]>
1 parent e644fbc commit ec2071a

File tree

1 file changed

+59
-0
lines changed

1 file changed

+59
-0
lines changed
Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
name: 🚀 Build release
2+
3+
on:
4+
workflow_dispatch:
5+
push:
6+
branches:
7+
- main
8+
9+
jobs:
10+
11+
build:
12+
runs-on: macos-14 # Apple Silicon Runner
13+
14+
steps:
15+
- uses: actions/checkout@v4
16+
- uses: n1hility/cancel-previous-runs@v3
17+
with:
18+
token: ${{ secrets.GITHUB_TOKEN }}
19+
20+
- name: Select latest Xcode
21+
uses: maxim-lobanov/setup-xcode@v1
22+
with:
23+
xcode-version: '15.4'
24+
25+
- name: 🛠️ Build with release configuration
26+
run: |
27+
swift build --configuration release | xcpretty --utf --color && exit ${PIPESTATUS[0]}
28+
29+
- name: 🤝 Create PR to Checkout SDK
30+
run: |
31+
FOLDER="adyen-ios"
32+
BRANCH_NAME="develop"
33+
PROJ_DIR=`pwd`
34+
35+
git clone https://github.com/Adyen/adyen-ios.git $FOLDER
36+
cd $FOLDER
37+
38+
echo "Content of adyen-ios"
39+
ls -la
40+
41+
git config user.email "[email protected]"
42+
git config user.name "Public Api Diff
43+
git checkout -b $BRANCH_NAME
44+
cd PROJ_DIR
45+
46+
rm -rf $FOLDER/Scripts/public-api-diff
47+
cp .build/release/public-api-diff $FOLDER/Scripts/public-api-diff
48+
chmod 774 $FOLDER/Scripts/public-api-diff
49+
50+
echo "Content of `Scripts`"
51+
ls -la $FOLDER/Scripts/
52+
53+
54+
cd $FOLDER
55+
git add .
56+
git commit -m "chore: update public-api-diff"
57+
git push origin $BRANCH_NAME
58+
59+
gh pr create --body "" --title "chore: update public-api-diff" --head "$BRANCH_NAME"

0 commit comments

Comments
 (0)