🤝 Update Checkout SDK #8
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 | |
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 | |
echo "- Setup git" | |
git config user.email "[email protected]" | |
git config user.name "public-api-diff" | |
cat .git/config | |
echo "- Commit changes" | |
git add . | |
git commit -m "chore: update public-api-diff" | |
echo "- Push changes" | |
git push origin $BRANCH_NAME | |
echo "- Create PR" | |
gh pr create --body "" --title "chore: update public-api-diff" --head "$BRANCH_NAME" |