@@ -26,20 +26,29 @@ jobs:
2626 os : ubuntu-20.04
2727 target : aarch64-unknown-linux-gnu
2828 lib : libanoncreds_uniffi.so
29+ libPath : uniffi/target/aarch64-unknown-linux-gnu/release/libanoncreds_uniffi.so
2930 use_cross : true
3031 - architecture : linux-x86_64
3132 os : ubuntu-20.04
3233 target : x86_64-unknown-linux-gnu
3334 lib : libanoncreds_uniffi.so
35+ libPath : uniffi/target/x86_64-unknown-linux-gnu/release/libanoncreds_uniffi.so
3436 use_cross : true
3537 - architecture : darwin-x86_64
3638 os : macos-latest
3739 target : x86_64-apple-darwin
3840 lib : libanoncreds_uniffi.dylib
41+ libPath : uniffi/target/x86_64-apple-darwin/release/libanoncreds_uniffi.dylib
3942 - architecture : darwin-aarch64
4043 os : macos-latest
4144 target : aarch64-apple-darwin
4245 lib : libanoncreds_uniffi.dylib
46+ libPath : uniffi/target/aarch64-apple-darwin/release/libanoncreds_uniffi.dylib
47+ - architecture : swift-package-universal
48+ os : macos-latest
49+ target : swift-package-universal
50+ lib : libanoncreds.xcframework.zip
51+ libPath : uniffi/output-frameworks/anoncreds-swift/libanoncreds.xcframework.zip
4352
4453 runs-on : ${{ matrix.os }}
4554
4857 uses : actions/checkout@v3
4958
5059 - name : Install Rust toolchain
51- if : " matrix.target != 'darwin -universal'"
60+ if : " matrix.target != 'swift-package -universal'"
5261 uses : dtolnay/rust-toolchain@stable
5362 with :
5463 toolchain : ${{ env.RUST_VERSION }}
7584 if : " runner.os == 'macOS'"
7685 run : |
7786 cd uniffi
78- if [ "${{ matrix.architecture }}" == "darwin -universal" ]; then
87+ if [ "${{ matrix.architecture }}" == "swift-package -universal" ]; then
7988 ./build-release-apple-universal.sh
8089 else
8190 cargo build --release --target ${{matrix.target}}
@@ -84,22 +93,23 @@ jobs:
8493 - name : Upload library artifacts
8594 uses : actions/upload-artifact@v3
8695 with :
87- name : library- ${{ matrix.architecture }}
88- path : uniffi/target/ ${{ matrix.target }}/release/${{ matrix.lib }}
96+ name : ${{ matrix.lib }}
97+ path : ${{ matrix.libPath }}
8998
9099 - name : Create library artifacts directory
91100 if : |
92101 github.event_name == 'release' ||
93102 (github.event_name == 'workflow_dispatch' && github.event.inputs.publish-binaries == 'true')
94103 run : |
95104 mkdir release-artifacts
96- cp uniffi/target/ ${{ matrix.target }}/release/${{ matrix.lib }} release-artifacts/
105+ cp ${{ matrix.libPath }} release-artifacts/
97106
98107 - name : Release artifacts
99108100109 if : |
110+ (${{ matrix.architecture }} != 'swift-package-universal' &&
101111 github.event_name == 'release' ||
102- (github.event_name == 'workflow_dispatch' && github.event.inputs.publish-binaries == 'true')
112+ (github.event_name == 'workflow_dispatch' && github.event.inputs.publish-binaries == 'true'))
103113 with :
104114 command : c
105115 cwd : release-artifacts
@@ -108,9 +118,20 @@ jobs:
108118
109119 - name : Add library artifacts to release
110120 if : |
121+ (${{ matrix.architecture }} != 'swift-package-universal' &&
111122 github.event_name == 'release' ||
112- (github.event_name == 'workflow_dispatch' && github.event.inputs.publish-binaries == 'true')
123+ (github.event_name == 'workflow_dispatch' && github.event.inputs.publish-binaries == 'true'))
113124 uses : svenstaro/upload-release-action@v2
114125 with :
115126 file : library-${{ matrix.architecture }}.tar.gz
116127 asset_name : " library-${{ matrix.architecture }}-${{ github.sha }}.tar.gz"
128+
129+ - name : Add swift package artifacts to release
130+ if : |
131+ (${{ matrix.architecture }} == 'swift-package-universal' &&
132+ github.event_name == 'release' ||
133+ (github.event_name == 'workflow_dispatch' && github.event.inputs.publish-binaries == 'true'))
134+ uses : svenstaro/upload-release-action@v2
135+ with :
136+ file : ${{ matrix.lib }}
137+ asset_name : " ${{ matrix.lib }}"
0 commit comments