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