Skip to content

Add sponsorship to repo #54

Add sponsorship to repo

Add sponsorship to repo #54

Workflow file for this run

name: CI
on:
push:
branches: [ main, release/* ]
tags: [ v* ]
pull_request:
branches: [ main, release/* ]
jobs:
build:
runs-on: macos-13
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0 # Required for Calculate Version step (e.g. GitVersion)
# Required by GitVersion
- name: Install .NET 6.0
uses: actions/setup-dotnet@v3
with:
dotnet-version: 6.0
- name: Install GitVersion
uses: gittools/actions/gitversion/setup@v0.10.2
with:
versionSpec: '5.12.0'
- name: GitVersion Config
uses: gittools/actions/gitversion/execute@v0.10.2
with:
useConfigFile: true
additionalArguments: '/showConfig'
- name: Determine Version
id: gitversion
uses: gittools/actions/gitversion/execute@v0.10.2
with:
useConfigFile: true
additionalArguments: '/updateprojectfiles'
- name: Install GitReleaseManager
uses: gittools/actions/gitreleasemanager/setup@v0.10.2
with:
versionSpec: '0.13.0'
- name: Show SDKS
run: xcodebuild -showsdks
# In XCode 12 it will build the simulator with a arm64 CPU. We don't want this as when
# we try to combine the simulator with the device build using Lipo we will get an error
# because both builds have the same CPU archecture.
- name: Build iOS Simulator
run: |
xcodebuild -sdk iphonesimulator -project "Sample Project/CheckBox.xcodeproj" -derivedDataPath build -scheme BEMCheckBox -configuration Release EXCLUDED_ARCHS="arm64"
echo "Listing: build/Build/Products/Release-iphonesimulator" && ls -la build/Build/Products/Release-iphonesimulator
echo "Listing: build/Build/Products/Release-iphonesimulator/BEMCheckBox.framework" && ls -la build/Build/Products/Release-iphonesimulator/BEMCheckBox.framework
lipo -info build/Build/Products/Release-iphonesimulator/BEMCheckBox.framework/BEMCheckBox
- name: Build iOS Device
run: |
xcodebuild -sdk iphoneos -project "Sample Project/CheckBox.xcodeproj" -derivedDataPath build -scheme BEMCheckBox -configuration Release
echo "Listing: build/Build/Products/Release-iphoneos" && ls -la build/Build/Products/Release-iphoneos
echo "Listing: build/Build/Products/Release-iphoneos/BEMCheckBox.framework" && ls -la build/Build/Products/Release-iphoneos/BEMCheckBox.framework
lipo -info build/Build/Products/Release-iphoneos/BEMCheckBox.framework/BEMCheckBox
- name: Combine Builds
run: |
cp -R build/Build/Products/Release-iphoneos/ Release-fat
echo "Listing: Release-fat" && ls -la Release-fat
echo "Listing: Release-fat/BEMCheckBox.framework/BEMCheckBox" && ls -la Release-fat/BEMCheckBox.framework/BEMCheckBox
- name: Build fat Binary
run: |
lipo -create -output Release-fat/BEMCheckBox.framework/BEMCheckBox build/Build/Products/Release-iphoneos/BEMCheckBox.framework/BEMCheckBox build/Build/Products/Release-iphonesimulator/BEMCheckBox.framework/BEMCheckbox
lipo -info Release-fat/BEMCheckBox.framework/BEMCheckBox
file Release-fat/BEMCheckBox.framework/BEMCheckBox
echo "Listing: Release-fat" && ls -la Release-fat
echo "Listing: Release-fat/BEMCheckBox.framework" && ls -la Release-fat/BEMCheckBox.framework
# Upload the directory, not a zip file, as uploading an artificate will automatically zip it
# and we don't want a zip in a zip.
- name: Upload Build Artificates to GitHub Workflow
uses: actions/upload-artifact@v3
with:
name: BEMCheckBox-v${{ steps.gitversion.outputs.majorMinorPatch }}.framework
path: Release-fat/BEMCheckBox.framework
# Only update to the release on a tag push. Assume the release exists by the
# time we create the tag. Also we need to create the zip as uploading to the release
# does not automatically zip the file.
- name: Upload fat Binary to GitHub Release
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/')
run: |
cd Release-fat/BEMCheckBox.framework
zip -r BEMCheckBox-v${{ steps.gitversion.outputs.majorMinorPatch }}.framework.zip .
echo "Listing: Release-fat/BEMCheckbox.framework" && ls -la
dotnet gitreleasemanager addasset --token ${{ secrets.GITHUB_TOKEN }} --owner ${{ github.repository_owner }} --repository ${{ github.event.repository.name }} --tagName v${{ steps.gitversion.outputs.majorMinorPatch }} --assets BEMCheckBox-v${{ steps.gitversion.outputs.majorMinorPatch }}.framework.zip