From 86a5b4ef85ca2caefaf1b6e68e5b997e05a8908b Mon Sep 17 00:00:00 2001 From: Thomas Raffray Date: Wed, 3 Apr 2024 13:55:42 +0200 Subject: [PATCH] fix(swift): include privacy file in spm (#2950) --- .../.github/workflows/release.yml | 12 ++++++------ templates/swift/Package.mustache | 5 ++++- 2 files changed, 10 insertions(+), 7 deletions(-) diff --git a/clients/algoliasearch-client-swift/.github/workflows/release.yml b/clients/algoliasearch-client-swift/.github/workflows/release.yml index 0257ba79fb..3ff3d2f71e 100644 --- a/clients/algoliasearch-client-swift/.github/workflows/release.yml +++ b/clients/algoliasearch-client-swift/.github/workflows/release.yml @@ -30,16 +30,16 @@ jobs: - name: Install CocoaPods run: gem install cocoapods - - name: Publish on CocoaPods + - name: Publish release on Github run: | set -eo pipefail - pod trunk push --allow-warnings --verbose AlgoliaSearchClient.podspec + gh release create ${{ steps.versions.outputs.RELEASE_VERSION }} --title ${{ steps.versions.outputs.RELEASE_VERSION }} -F CHANGELOG.md --target ${{ github.sha }} env: - COCOAPODS_TRUNK_TOKEN: ${{ secrets.COCOAPODS_TRUNK_TOKEN }} + GH_TOKEN: ${{ github.token }} - - name: Publish release on Github + - name: Publish on CocoaPods run: | set -eo pipefail - gh release create ${{ steps.versions.outputs.RELEASE_VERSION }} --title ${{ steps.versions.outputs.RELEASE_VERSION }} -F CHANGELOG.md --target ${{ github.sha }} + pod trunk push --allow-warnings --verbose AlgoliaSearchClient.podspec env: - GH_TOKEN: ${{ github.token }} + COCOAPODS_TRUNK_TOKEN: ${{ secrets.COCOAPODS_TRUNK_TOKEN }} diff --git a/templates/swift/Package.mustache b/templates/swift/Package.mustache index 3d70925b33..94aadb172e 100644 --- a/templates/swift/Package.mustache +++ b/templates/swift/Package.mustache @@ -62,7 +62,10 @@ products.append( dependencies: [ .target(name: "Core"), ] + extraTargetDependencies, - path: "Sources/\(library)" + path: "Sources/\(library)", + resources: [ + .copy("../../PrivacyInfo.xcprivacy") + ] ) )