From 39bcb210a00bd1151a54d80242f8b547d69a1c9e Mon Sep 17 00:00:00 2001 From: Bart Louwers Date: Thu, 4 Jan 2024 10:48:30 +0100 Subject: [PATCH] Automated CocoaPods release (#1991) --- .github/workflows/ios-ci.yml | 13 +++++++++++-- platform/ios/MapLibre.podspec | 13 +++++++------ 2 files changed, 18 insertions(+), 8 deletions(-) diff --git a/.github/workflows/ios-ci.yml b/.github/workflows/ios-ci.yml index 3caa4aa0a..4f6aa354d 100644 --- a/.github/workflows/ios-ci.yml +++ b/.github/workflows/ios-ci.yml @@ -221,14 +221,23 @@ jobs: git tag -a ios-v${{ env.version }} -m "Publish ios-v${{ env.version }}" ${{ github.sha }} git push origin ios-v${{ env.version }} - - name: Release + - name: Release (GitHub) if: env.make_release + id: release uses: softprops/action-gh-release@v1 with: name: ios-v${{ env.version }} - files: ${{ env.xcframework }} + files: | + ${{ env.xcframework }} + LICENSE.md tag_name: ios-v${{ env.version }} prerelease: ${{ !github.event.inputs.release }} + fail_on_unmatched_files: true + + - name: Release (CocoaPods) + if: env.make_release + run: | + VERSION=${{ env.version }} COCOAPODS_TRUNK_TOKEN=${{ secrets.COCOAPODS_PASSWORD }} pod trunk push MapLibre.podspec ios-ci-result: runs-on: ubuntu-latest diff --git a/platform/ios/MapLibre.podspec b/platform/ios/MapLibre.podspec index ccf6528ba..bdb2cea5f 100644 --- a/platform/ios/MapLibre.podspec +++ b/platform/ios/MapLibre.podspec @@ -1,18 +1,19 @@ Pod::Spec.new do |s| - version = '6.0.0-pre0' + version = "#{ENV['VERSION']}" s.name = 'MapLibre' s.version = version - s.license = { :type => 'BSD', :text => '' } + s.license = { :type => 'BSD', :file => "LICENSE.md" } s.homepage = 'https://maplibre.org/' s.authors = { 'MapLibre' => '' } s.summary = 'Open source vector map solution for iOS with full styling capabilities.' s.platform = :ios s.source = { - :http => "https://github.com/maplibre/maplibre-native/releases/download/ios-v#{version.to_s}/MapLibre-#{version.to_s}.zip", - :flatten => false + :http => "https://github.com/maplibre/maplibre-native/releases/download/ios-v#{version.to_s}/MapLibre.dynamic.xcframework.zip", + :type => "zip" } s.social_media_url = 'https://mastodon.social/@maplibre' - s.ios.deployment_target = '11.0' - s.ios.vendored_frameworks = "**/MapLibre.xcframework" + s.ios.deployment_target = '12.0' + s.ios.vendored_frameworks = "MapLibre.xcframework" end +