Skip to content

test: Use macos-14 and xcode 15 #8

test: Use macos-14 and xcode 15

test: Use macos-14 and xcode 15 #8

name: Prepare Release
on:
push:
branches:
- test/change-xcode-release
jobs:
build-and-release:
runs-on: macos-14
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Link SwiftLint or install it
run: brew link --overwrite swiftlint || brew install swiftlint
- name: Set up XCode
run: sudo xcode-select --switch /Applications/Xcode_15.0.app
- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: '3.3'
- name: Bump version
run: ruby ./scripts/bump_versions.rb patch
- name: Build XCFramework
run: ./scripts/build_framework.sh
- name: Get new version
id: version
run: echo "VERSION=$(ruby -e 'puts File.read("./IONFileViewerLib.podspec").match(/spec.version.*=.*''(\d+\.\d+\.\d+)''/)[1]')" >> $GITHUB_ENV
- name: Move zip file to root and push changes
run: |
if [ -f IONFileViewerLib.zip ]; then
rm IONFileViewerLib.zip
else
echo "File does not exist."
fi
mv build/IONFileViewerLib.zip .
git config --global user.name 'github-actions[bot]'
git config --global user.email 'github-actions[bot]@users.noreply.github.com'
git add .
git commit -m "chore: Bump version to ${{ env.VERSION }} [skip ci]"
git push