🤝 Update Checkout SDK #2
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: 🤝 Update Checkout SDK | |
on: | |
workflow_dispatch: | |
push: | |
branches: | |
- main | |
jobs: | |
build: | |
runs-on: macos-14 # Apple Silicon Runner | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: n1hility/cancel-previous-runs@v3 | |
with: | |
token: ${{ secrets.GITHUB_TOKEN }} | |
- name: Select latest Xcode | |
uses: maxim-lobanov/setup-xcode@v1 | |
with: | |
xcode-version: '15.4' | |
- name: 🛠️ Build with release configuration | |
run: | | |
swift build --configuration release | xcpretty --utf --color && exit ${PIPESTATUS[0]} | |
- name: 🤝 Create PR to Checkout SDK | |
run: | | |
FOLDER="adyen-ios" | |
BRANCH_NAME="develop" | |
PROJ_DIR=`pwd` | |
git clone https://github.com/Adyen/adyen-ios.git $FOLDER | |
cd $FOLDER | |
echo "Content of adyen-ios" | |
ls -la | |
echo "Setup git" | |
git config user.email "[email protected]" | |
git config user.name "Public Api Diff | |
echo "- Check out $BRANCH_NAME" | |
git checkout -b $BRANCH_NAME | |
cd PROJ_DIR | |
echo "- Remove existing script" | |
rm -rf $FOLDER/Scripts/public-api-diff | |
echo "- Copy over new script" | |
cp .build/release/public-api-diff $FOLDER/Scripts/public-api-diff | |
echo "- Adjusting permissions" | |
chmod 774 $FOLDER/Scripts/public-api-diff | |
echo "Content of `Scripts`" | |
ls -la $FOLDER/Scripts/ | |
cd $FOLDER | |
git add . | |
git commit -m "chore: update public-api-diff" | |
git push origin $BRANCH_NAME | |
gh pr create --body "" --title "chore: update public-api-diff" --head "$BRANCH_NAME" |