From 2b55e24d5419c489d04d9898b5f3f71f2d5c0abe Mon Sep 17 00:00:00 2001 From: Micaiah Martin Date: Mon, 30 Oct 2023 12:33:36 -0600 Subject: [PATCH] Update package.swift with url and update tag --- .github/workflows/release-swift.yml | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/.github/workflows/release-swift.yml b/.github/workflows/release-swift.yml index 8b370d7cb..48526d1ac 100644 --- a/.github/workflows/release-swift.yml +++ b/.github/workflows/release-swift.yml @@ -111,6 +111,15 @@ jobs: - name: Update files run: | + # Update BitwardenFFI path + sed -i '' 's|.binaryTarget(name: "BitwardenFFI", path: "BitwardenFFI.xcframework")|.binaryTarget(\ + name: "BitwardenFFI",\ + url: "https://github.com/bitwarden/sdk/releases/download/BitwardenFFI-v${{ env._PKG_VERSION }}/BitwardenFFI-${{ env._PKG_VERSION }}.xcframework.zip",|' sdk/languages/swift/Package.swift + + # Run swiftformat + swiftformat sdk/languages/swift/Package.swift + + # Copy files to local sdk-swift repo path cp --verbose -rf sdk/languages/swift/README.md sdk-swift/README.md cp --verbose -rf sdk/languages/swift/Package.swift sdk-swift/Package.swift cp --verbose -rf sdk/languages/swift/Sources sdk-swift/Sources @@ -137,12 +146,12 @@ jobs: working-directory: sdk-swift run: | # Check if tag exists, set output then exit 0 if true. - if git log v${{ env._PKG_VERSION }} >/dev/null 2>&1; then + if git log ${{ env._PKG_VERSION }} >/dev/null 2>&1; then echo "===================================" - echo "[!] Tag v${{ env._PKG_VERSION }} already exists" + echo "[!] Tag ${{ env._PKG_VERSION }} already exists" echo "===================================" exit 1 fi - git tag v${{ env._PKG_VERSION }} - git push origin v${{ env._PKG_VERSION }} + git tag ${{ env._PKG_VERSION }} + git push origin ${{ env._PKG_VERSION }}