Skip to content

Commit

Permalink
chore: update iOS deployment target to 16.0
Browse files Browse the repository at this point in the history
  • Loading branch information
DannyBedard committed Jun 19, 2024
1 parent 60ca83b commit 2d5b113
Show file tree
Hide file tree
Showing 2 changed files with 44 additions and 42 deletions.
84 changes: 43 additions & 41 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -170,44 +170,46 @@ jobs:
- name: Build iOS libraries
run: sh wrappers/swift/build.sh

- name: Setup CocoaPods Trunk Token
run: |
echo -e "machine trunk.cocoapods.org\n login bot@devolutions.net\n password ${{ secrets.COCOAPODS_TRUNK_TOKEN }}" > ~/.netrc
chmod 0600 ~/.netrc
- name: Setup version
id: version
run: |
VERSION=$(grep -E "^\s*s\.version\s*=\s*['\"][0-9]+\.[0-9]+\.[0-9]+['\"]" Slauth.podspec | awk -F"[\"\']" '{print $2}')
echo "version=$VERSION" >> $GITHUB_OUTPUT
- name: Push to a new branch
run: |
git checkout --orphan release/cocoapods-v${{ steps.version.outputs.version }}
git rm -rf .
git checkout master -- LICENSE wrappers/swift/classes slauth.h Slauth.podspec
git add LICENSE wrappers/swift/classes/** slauth.h Slauth.podspec
find target/universal/release -name "*.a" -exec git add {} \;
find target/x86_64-apple-ios/release -name "*.a" -exec git add {} \;
find target/aarch64-apple-ios/release -name "*.a" -exec git add {} \;
git commit -m "Set up CocoaPods release branch"
git push origin release/cocoapods-v${{ steps.version.outputs.version }}
git tag '${{ steps.version.outputs.version }}'
git push --tags
env:
GITHUB_TOKEN: ${{ github.token }}

- name: Publish to CocoaPods
run: pod trunk push Slauth.podspec --skip-import-validation --use-libraries --allow-warnings
env:
COCOAPODS_TRUNK_TOKEN: ${{ secrets.COCOAPODS_TRUNK_TOKEN }}

- name: Delete branch
run: |
git fetch
git switch master
git branch -D release/cocoapods-v${{ steps.version.outputs.version }}
git push origin --delete release/cocoapods-v${{ steps.version.outputs.version }}
# - name: Setup CocoaPods Trunk Token
# run: |
# echo -e "machine trunk.cocoapods.org\n login bot@devolutions.net\n password ${{ secrets.COCOAPODS_TRUNK_TOKEN }}" > ~/.netrc
# chmod 0600 ~/.netrc

# - name: Setup version
# id: version
# run: |
# VERSION=$(grep -E "^\s*s\.version\s*=\s*['\"][0-9]+\.[0-9]+\.[0-9]+['\"]" Slauth.podspec | awk -F"[\"\']" '{print $2}')
# echo "version=$VERSION" >> $GITHUB_OUTPUT

# - name: Push to a new branch
# run: |
# git checkout --orphan release/cocoapods-v${{ steps.version.outputs.version }}
# git rm -rf .
# git checkout master -- LICENSE wrappers/swift/classes slauth.h Slauth.podspec

# git add LICENSE wrappers/swift/classes/** slauth.h Slauth.podspec
# find target/universal/release -name "*.a" -exec git add {} \;
# find target/x86_64-apple-ios/release -name "*.a" -exec git add {} \;

# git commit -m "Set up CocoaPods release branch"
# git push origin release/cocoapods-v${{ steps.version.outputs.version }}

# git tag '${{ steps.version.outputs.version }}'
# git push --tags
# env:
# GITHUB_TOKEN: ${{ github.token }}

- name: Validate podspec
run: pod spec lint --skip-import-validation --use-libraries --allow-warnings

# - name: Publish to CocoaPods
# run: pod trunk push Slauth.podspec --skip-import-validation --use-libraries --allow-warnings
# env:
# COCOAPODS_TRUNK_TOKEN: ${{ secrets.COCOAPODS_TRUNK_TOKEN }}

# - name: Delete branch
# run: |
# git fetch
# git switch master
# git branch -D release/cocoapods-v${{ steps.version.outputs.version }}
# git push origin --delete release/cocoapods-v${{ steps.version.outputs.version }}
2 changes: 1 addition & 1 deletion Slauth.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ TODO: Add long description of the pod here.
s.source = { :git => 'https://github.com/Devolutions/Slauth.git', :tag => s.version.to_s }

s.swift_version = '5.0'
s.ios.deployment_target = '17.0'
s.ios.deployment_target = '16.0'

s.source_files = 'wrappers/swift/classes/**/*', 'slauth.h'
s.vendored_libraries = 'target/universal/release/*.a', 'target/x86_64-apple-io/release/*.a', 'target/aarch64-apple-ios/release/*.a'
Expand Down

0 comments on commit 2d5b113

Please sign in to comment.