|
1 | 1 | name: Release Framework
|
2 | 2 | permissions:
|
3 |
| - contents: write |
4 |
| - statuses: read |
5 |
| - pull-requests: read |
6 |
| - actions: read |
7 |
| - checks: write |
| 3 | + contents: write |
| 4 | + statuses: read |
| 5 | + pull-requests: read |
| 6 | + actions: read |
| 7 | + checks: write |
8 | 8 | on:
|
9 |
| - push: |
10 |
| - tags: |
11 |
| - - "*" |
| 9 | + push: |
| 10 | + tags: |
| 11 | + - "*" |
12 | 12 |
|
13 | 13 | jobs:
|
14 |
| - archive: |
15 |
| - name: Archive Frameworks (${{ matrix.configuration['platform'] }}) |
16 |
| - runs-on: macos-12 |
17 |
| - strategy: |
18 |
| - fail-fast: false |
19 |
| - matrix: |
20 |
| - configuration: |
21 |
| - - scheme: LDKFramework |
22 |
| - destination: generic/platform=iOS |
23 |
| - platform: iOS |
24 |
| - project: LDK/LDKFramework.xcodeproj |
25 |
| - - scheme: LDKFramework |
26 |
| - destination: generic/platform=iOS Simulator |
27 |
| - platform: iOS Simulator |
28 |
| - project: LDK/LDKFramework.xcodeproj |
29 |
| - - scheme: LDKFramework_Mac |
30 |
| - destination: generic/platform=OS X |
31 |
| - platform: Darwin |
32 |
| - project: LDK/LDKFramework.xcodeproj |
33 |
| - - scheme: LDKFramework |
34 |
| - destination: generic/platform=macOS |
35 |
| - platform: Catalyst |
36 |
| - project: LDK/LDKFramework.xcodeproj |
37 |
| - env: |
38 |
| - DEVELOPER_DIR: /Applications/Xcode_13.2.1.app/Contents/Developer |
39 |
| - BUILD_DIR: ./build |
40 |
| - LDK_C_BINDINGS_BASE: /Users/runner/work/ldk-swift/ldk-swift/bindings/artifacts/ldk-c-bindings |
41 |
| - LDK_C_BINDINGS_BINARY_DIRECTORY: /Users/runner/work/ldk-swift/ldk-swift/bindings/artifacts/bin |
42 |
| - steps: |
43 |
| - - name: Configure Xcode |
44 |
| - uses: maxim-lobanov/setup-xcode@v1 |
45 |
| - with: |
46 |
| - xcode-version: latest |
47 |
| - - name: Checkout |
48 |
| - uses: actions/checkout@v2 |
49 |
| - - name: Install Dependencies |
50 |
| - uses: ./.github/actions/install-dependencies |
51 |
| - - name: Archive |
52 |
| - uses: ./.github/actions/archive-framework |
53 |
| - with: |
54 |
| - project: ${{ matrix.configuration['project'] }} |
55 |
| - scheme: ${{ matrix.configuration['scheme'] }} |
56 |
| - destination: ${{ matrix.configuration['destination'] }} |
57 |
| - platform: ${{ matrix.configuration['platform'] }} |
58 |
| - - name: Upload Archive |
59 |
| - uses: actions/upload-artifact@v3 |
60 |
| - with: |
61 |
| - name: LDKFramework-${{ matrix.configuration['platform'] }}.xcarchive |
62 |
| - path: | |
63 |
| - ./xcode/build/LDKFramework-${{ matrix.configuration['platform'] }}.xcarchive |
64 |
| - create-xcframework: |
65 |
| - name: Create Fat Framework |
66 |
| - runs-on: macos-12 |
67 |
| - needs: [archive] |
68 |
| - env: |
69 |
| - DEVELOPER_DIR: /Applications/Xcode_13.2.1.app/Contents/Developer |
70 |
| - BUILD_DIR: ./build |
71 |
| - steps: |
72 |
| - - name: Download xcarchives |
73 |
| - uses: actions/download-artifact@v3 |
74 |
| - - name: Create xcframework and release |
75 |
| - run: | |
76 |
| - xcodebuild -create-xcframework \ |
77 |
| - -framework LDKFramework-iOS.xcarchive/Products/Library/Frameworks/LDKFramework.framework \ |
78 |
| - -framework LDKFramework-iOS\ Simulator.xcarchive/Products/Library/Frameworks/LDKFramework.framework \ |
79 |
| - -framework LDKFramework-Catalyst.xcarchive/Products/Library/Frameworks/LDKFramework.framework \ |
80 |
| - -framework LDKFramework-Darwin.xcarchive/Products/Library/Frameworks/LDKFramework_Mac.framework \ |
81 |
| - -output LDKFramework.xcframework |
82 |
| - - name: Zip Xcframework |
83 |
| - run: | |
84 |
| - zip -r LDKFramework.xcframework.zip LDKFramework.xcframework |
85 |
| - - name: Upload Framework Artifact |
86 |
| - uses: actions/upload-artifact@v3 |
87 |
| - with: |
88 |
| - name: LDKFramework.xcframework.zip |
89 |
| - path: LDKFramework.xcframework.zip |
90 |
| - release: |
91 |
| - name: Create Release |
92 |
| - runs-on: ubuntu-latest |
93 |
| - needs: [create-xcframework] |
94 |
| - steps: |
95 |
| - - name: Download Framework Artifact |
96 |
| - uses: actions/download-artifact@v3 |
97 |
| - with: |
98 |
| - name: LDKFramework.xcframework.zip |
99 |
| - - name: Create Release |
100 |
| - uses: softprops/action-gh-release@v1 |
101 |
| - with: |
102 |
| - files: LDKFramework.xcframework.zip |
| 14 | + generate-xcframework: |
| 15 | + name: Generate XCFramework |
| 16 | + runs-on: macos-12 |
| 17 | + env: |
| 18 | + DEVELOPER_DIR: /Applications/Xcode_13.2.1.app/Contents/Developer |
| 19 | + LDK_C_BINDINGS_BASE: /Users/runner/work/ldk-swift/ldk-swift/bindings/artifacts/ldk-c-bindings |
| 20 | + steps: |
| 21 | + - name: Configure Xcode |
| 22 | + uses: maxim-lobanov/setup-xcode@v1 |
| 23 | + with: |
| 24 | + xcode-version: latest |
| 25 | + - name: Checkout |
| 26 | + uses: actions/checkout@v2 |
| 27 | + - name: Install Dependencies |
| 28 | + uses: ./.github/actions/install-dependencies |
| 29 | + - name: Generate XCFramework |
| 30 | + uses: ./.github/actions/generate-xcframework |
| 31 | + - name: Zip Xcframework |
| 32 | + run: | |
| 33 | + zip -9 -r LDKFramework.xcframework.zip /Users/runner/work/ldk-swift/ldk-swift/bindings/bin/release/LDKFramework.xcframework |
| 34 | + - name: Upload Framework Artifact |
| 35 | + uses: actions/upload-artifact@v3 |
| 36 | + with: |
| 37 | + name: LDKFramework.xcframework.zip |
| 38 | + path: LDKFramework.xcframework.zip |
| 39 | + release: |
| 40 | + name: Publish Release |
| 41 | + runs-on: ubuntu-latest |
| 42 | + needs: [ generate-xcframework ] |
| 43 | + steps: |
| 44 | + - name: Download Framework Artifact |
| 45 | + uses: actions/download-artifact@v3 |
| 46 | + with: |
| 47 | + name: LDKFramework.xcframework.zip |
| 48 | + - name: Create Release |
| 49 | + uses: softprops/action-gh-release@v1 |
| 50 | + with: |
| 51 | + files: LDKFramework.xcframework.zip |
0 commit comments