77 required : true
88 type : string
99 ref :
10- description : ' Ref (branch, tag, commit) to checkout (from rust-nostr/nostr repo)'
10+ description : ' Ref (branch, tag, commit) to checkout (from rust-nostr/nostr-sdk-ffi repo)'
1111 required : true
1212 type : string
1313 default : ' master'
2727 - name : Checkout nostr repo
2828 uses : actions/checkout@v4
2929 with :
30- repository : ${{ github.repository_owner }}/nostr
30+ repository : ${{ github.repository_owner }}/nostr-sdk-ffi
3131 path : build
3232 ref : ${{ inputs.ref }}
3333
@@ -41,20 +41,19 @@ jobs:
4141 run : cargo install just
4242
4343 - name : Build Swift bindings
44- working-directory : build/bindings/nostr-sdk-ffi
4544 run : just swift
4645
4746 - name : Compress XCFramework
48- working-directory : build/bindings/nostr-sdk-ffi/ swift
47+ working-directory : swift
4948 run : |
5049 zip -9 -r nostr_sdkFFI.xcframework.zip nostr_sdkFFI.xcframework
5150 echo "XCF_CHECKSUM=`swift package compute-checksum nostr_sdkFFI.xcframework.zip`" >> $GITHUB_ENV
5251
5352 - name : Update Swift Package definition
54- working-directory : build/bindings/nostr-sdk-ffi/ swift
53+ working-directory : swift
5554 run : |
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
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
5857
5958 - name : Tag the Swift bindings
6059 working-directory : dist
7170 - name : Release and attach XCFramework binary artifact
7271 uses : ncipollo/release-action@v1
7372 with :
74- artifacts : " build/bindings/nostr-sdk-ffi/ swift/nostr_sdkFFI.xcframework.zip"
73+ artifacts : " swift/nostr_sdkFFI.xcframework.zip"
7574 tag : ${{ inputs.version }}
7675 token : ${{ secrets.GITHUB_TOKEN }}
7776 name : ${{ inputs.version }}
0 commit comments