7
7
required : true
8
8
type : string
9
9
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)'
11
11
required : true
12
12
type : string
13
13
default : ' master'
28
28
uses : actions/checkout@v4
29
29
with :
30
30
repository : ${{ github.repository_owner }}/nostr-sdk-ffi
31
- path : build
31
+ path : nostr-sdk-ffi
32
32
ref : ${{ inputs.ref }}
33
33
34
34
- name : Checkout nostr-sdk-swift repo
@@ -41,19 +41,20 @@ jobs:
41
41
run : cargo install just
42
42
43
43
- name : Build Swift bindings
44
+ working-directory : nostr-sdk-ffi
44
45
run : just swift
45
46
46
47
- name : Compress XCFramework
47
- working-directory : swift
48
+ working-directory : nostr-sdk-ffi/ swift
48
49
run : |
49
50
zip -9 -r nostr_sdkFFI.xcframework.zip nostr_sdkFFI.xcframework
50
51
echo "XCF_CHECKSUM=`swift package compute-checksum nostr_sdkFFI.xcframework.zip`" >> $GITHUB_ENV
51
52
52
53
- name : Update Swift Package definition
53
- working-directory : swift
54
+ working-directory : nostr-sdk-ffi/ swift
54
55
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
57
58
58
59
- name : Tag the Swift bindings
59
60
working-directory : dist
70
71
- name : Release and attach XCFramework binary artifact
71
72
uses : ncipollo/release-action@v1
72
73
with :
73
- artifacts : " swift/nostr_sdkFFI.xcframework.zip"
74
+ artifacts : " nostr-sdk-ffi/ swift/nostr_sdkFFI.xcframework.zip"
74
75
tag : ${{ inputs.version }}
75
76
token : ${{ secrets.GITHUB_TOKEN }}
76
77
name : ${{ inputs.version }}
0 commit comments