Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 20 additions & 16 deletions .github/workflows/create-nuget.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,28 +23,32 @@ jobs:
with:
dotnet-version: '9.x'

- name: Build MBProgressHUD for simulator

- name: Build MBProgressHUD iphonesimulator Framework
run: |
xcodebuild -project ${{ env.SRC_FOLDER }}/${{ env.PROJ_NAME }} \
-target "MBProgressHUD Static Library" \
-target "MBProgressHUD Framework" \
-sdk iphonesimulator${{ env.SDK }} \
IPHONEOS_DEPLOYMENT_TARGET=12.0 \
EXCLUDED_ARCHS="arm64"

- name: Build MBProgressHUD for device
- name: Build MBProgressHUD iphonesimulator Framework
run: |
xcodebuild -project ${{ env.SRC_FOLDER }}/${{ env.PROJ_NAME }} \
-target "MBProgressHUD Static Library" \
-target "MBProgressHUD Framework" \
-sdk iphoneos${{ env.SDK }} \
IPHONEOS_DEPLOYMENT_TARGET=12.0

- name: Create universal lib with lipo in dotnet-binding

- name: Build xcframework
run: |
lipo -create \
${{ env.SRC_FOLDER }}/build/Release-iphoneos/libMBProgressHUD.a \
${{ env.SRC_FOLDER }}/build/Release-iphonesimulator/libMBProgressHUD.a \
-output ./dotnet-binding/libMBProgressHUD.a
lipo -info ./dotnet-binding/libMBProgressHUD.a
xcodebuild -create-xcframework \
-framework "${{ env.SRC_FOLDER }}/build/Release-iphonesimulator/MBProgressHUD.framework" \
-framework "${{ env.SRC_FOLDER }}/build/Release-iphoneos/MBProgressHUD.framework" \
-output ./dotnet-binding/MBProgressHUD.xcframework

- name: Upload .xcframework as artifact
uses: actions/[email protected]
with:
name: xcframework
compression-level: '1'
path: ./dotnet-binding/MBProgressHUD.xcframework

- name: restore workload
working-directory: ./dotnet-binding
Expand All @@ -61,6 +65,6 @@ jobs:
- name: Upload .nupkg as artifact
uses: actions/[email protected]
with:
name: nuget-package
name: MBProgressHUD-nuget-package
compression-level: '0'
path: /Users/runner/work/MBProgressHUD-dotnet/MBProgressHUD-dotnet/dotnet-binding/bin/Release/*.nupkg
path: ${{ env.SRC_FOLDER }}/dotnet-binding/bin/Release/*.nupkg
6 changes: 3 additions & 3 deletions dotnet-binding/MBProgressHUD-dotnet.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

<!-- Nuget package -->
<PackageId>com.jonathanantoine.MBProgressHUD</PackageId>
<Version>1.0.0.0</Version>
<Version>1.0.0.1</Version>
<Authors>Jonathan Antoine</Authors>
<Title>MBProgressHUD for dotnet</Title>
<PackageProjectUrl>https://github.com/jonathanantoine/MBProgressHUD-dotnet</PackageProjectUrl>
Expand All @@ -25,8 +25,8 @@
<None Include="README.md" Pack="true" PackagePath="\"/>
</ItemGroup>
<ItemGroup>
<NativeReference Include="libMBProgressHUD.a">
<Kind>Static</Kind>
<NativeReference Include="MBProgressHUD.xcframework">
<Kind>Framework</Kind>
<Frameworks>Foundation ImageIO CoreGraphics</Frameworks>
</NativeReference>
</ItemGroup>
Expand Down