diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 12901b8..5132ea8 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -94,6 +94,11 @@ jobs: working-directory: .build/artifacts run: zip -r AnalyticsConnector.xcframework.zip AnalyticsConnector.xcframework + - name: Update Checksum + run: | + CHECKSUM=$(xcrun swift package compute-checksum .build/artifacts/AnalyticsConnector.xcframework.zip) && \ + sed -i '' -E "s/(checksum: \")[^\"]*(\")/\1$CHECKSUM\2/" Package.swift + - name: Semantic Release --dry-run if: ${{ github.event.inputs.dryRun == 'true'}} env: diff --git a/Package.swift b/Package.swift index 7ee83fc..0631f39 100644 --- a/Package.swift +++ b/Package.swift @@ -27,6 +27,9 @@ let package = Package( name: "AnalyticsConnector", path: "Sources/AnalyticsConnector", exclude: ["Info.plist"]), + .binaryTarget(name: "AnalyticsConnectorFramework", + url: "https://github.com/amplitude/analytics-connector-ios/releases/download/v1.1.1/AnalyticsConnector.xcframework.zip", + checksum: "4d5ecd7301d34ef4cfb91a799e8d32940fd7c9eac4b5ab62b820ad447d18b594"), .testTarget( name: "AnalyticsConnectorTests", dependencies: ["AnalyticsConnector"], diff --git a/release.config.js b/release.config.js index f3945d4..67f05f5 100644 --- a/release.config.js +++ b/release.config.js @@ -37,6 +37,20 @@ module.exports = { ], "countMatches": true }, + { + "files": ["Package.swift"], + "from": "https://github.com/amplitude/analytics-connector-ios/releases/download/v.*/AnalyticsConnector.xcframework.zip", + "to": "https://github.com/amplitude/analytics-connector-ios/releases/download/v${nextRelease.version}/AnalyticsConnector.xcframework.zip", + "results": [ + { + "file": "Package.swift", + "hasChanged": true, + "numMatches": 1, + "numReplacements": 1 + } + ], + "countMatches": true + }, ] } ],