77 required : true
88 type : string
99 ref :
10- description : ' Ref (branch, tag, commit) to checkout (from rust-nostr/nostr-sdk-ffi repo)'
10+ description : ' Ref (branch, tag, commit) to checkout (from rust-nostr/nostr repo)'
1111 required : true
1212 type : string
1313 default : ' master'
2828 uses : actions/checkout@v4
2929 with :
3030 repository : ${{ github.repository_owner }}/nostr-sdk-ffi
31- path : build
31+ path : nostr-sdk-ffi
3232 ref : ${{ inputs.ref }}
3333
3434 - name : Checkout nostr-sdk-swift repo
@@ -41,19 +41,20 @@ jobs:
4141 run : cargo install just
4242
4343 - name : Build Swift bindings
44+ working-directory : nostr-sdk-ffi
4445 run : just swift
4546
4647 - name : Compress XCFramework
47- working-directory : swift
48+ working-directory : nostr-sdk-ffi/ swift
4849 run : |
4950 zip -9 -r nostr_sdkFFI.xcframework.zip nostr_sdkFFI.xcframework
5051 echo "XCF_CHECKSUM=`swift package compute-checksum nostr_sdkFFI.xcframework.zip`" >> $GITHUB_ENV
5152
5253 - name : Update Swift Package definition
53- working-directory : swift
54+ working-directory : nostr-sdk-ffi/ swift
5455 run : |
55- sed 's#.binaryTarget(name: "nostr_sdkFFI", path: "./nostr_sdkFFI.xcframework"),#.binaryTarget(name: "nostr_sdkFFI", url: "https://github.com/rust-nostr/nostr-sdk-swift/releases/download/${{ inputs.version }}/nostr_sdkFFI.xcframework.zip", checksum: "${{ env.XCF_CHECKSUM }}"),#;/.testTarget(name: "NostrSDKTests", dependencies: \["NostrSDK"\]),/d' Package.swift > ../dist/Package.swift
56- cp -r Sources ../dist
56+ sed 's#.binaryTarget(name: "nostr_sdkFFI", path: "./nostr_sdkFFI.xcframework"),#.binaryTarget(name: "nostr_sdkFFI", url: "https://github.com/rust-nostr/nostr-sdk-swift/releases/download/${{ inputs.version }}/nostr_sdkFFI.xcframework.zip", checksum: "${{ env.XCF_CHECKSUM }}"),#;/.testTarget(name: "NostrSDKTests", dependencies: \["NostrSDK"\]),/d' Package.swift > ../../ dist/Package.swift
57+ cp -r Sources ../../ dist
5758
5859 - name : Tag the Swift bindings
5960 working-directory : dist
7071 - name : Release and attach XCFramework binary artifact
7172 uses : ncipollo/release-action@v1
7273 with :
73- artifacts : " swift/nostr_sdkFFI.xcframework.zip"
74+ artifacts : " nostr-sdk-ffi/ swift/nostr_sdkFFI.xcframework.zip"
7475 tag : ${{ inputs.version }}
7576 token : ${{ secrets.GITHUB_TOKEN }}
7677 name : ${{ inputs.version }}
0 commit comments