Skip to content

1.4.2

1.4.2 #9

Workflow file for this run

name: Upload Assets
on:
release:
types: [published]
jobs:
xcframework:
strategy:
matrix:
os: [macOS-13]
xcode: ['15.0']
name: Upload XCFramework Assets
runs-on: ${{ matrix.os }}
env:
TMPDIR: /tmp/.half.assets-xcframework.build
steps:
- name: Select Xcode Version
uses: maxim-lobanov/setup-xcode@v1
with:
xcode-version: ${{ matrix.xcode }}
- name: Checkout Code
uses: actions/checkout@v4
- name: Setup Environment
run: |
mkdir -p "${TMPDIR}/Output"
mkdir -p "${TMPDIR}/Logs"
- name: Build
run: |
./scripts/xcframework.sh --build-dir "${TMPDIR}" --output "${TMPDIR}/Output/Half.xcframework" -- RUN_DOCUMENTATION_COMPILER=NO SKIP_SWIFTLINT=YES
- name: Create Zip
run: |
cd "${TMPDIR}/Output"
zip -rX Half.xcframework.zip Half.xcframework 2>&1 | tee "${TMPDIR}/Logs/Zip.log"
- name: Upload Zip
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ github.event.release.upload_url }}
asset_path: ${{ env.TMPDIR }}/Output/Half.xcframework.zip
asset_name: Half.xcframework.zip
asset_content_type: application/zip
- name: Create Tar
run: |
cd "${TMPDIR}/Output"
tar -zcvf Half.xcframework.tar.gz Half.xcframework 2>&1 | tee "${TMPDIR}/Logs/Tar.log"
- name: Upload Tar
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ github.event.release.upload_url }}
asset_path: ${{ env.TMPDIR }}/Output/Half.xcframework.tar.gz
asset_name: Half.xcframework.tar.gz
asset_content_type: application/gzip
- name: Upload Logs
uses: actions/upload-artifact@v3
if: always()
with:
name: XCFrameworkLogs
path: ${{ env.TMPDIR }}/Logs/*.log
documentation:
strategy:
matrix:
os: [macOS-13]
xcode: ['15.0']
name: Upload Documentation Assets
runs-on: ${{ matrix.os }}
env:
TMPDIR: /tmp/.half.assets-documentation.build
steps:
- name: Select Xcode Version
uses: maxim-lobanov/setup-xcode@v1
with:
xcode-version: ${{ matrix.xcode }}
- name: Checkout Code
uses: actions/checkout@v4
- name: Setup Environment
run: |
mkdir -p "${TMPDIR}/Output"
mkdir -p "${TMPDIR}/Logs"
- name: Build
run: |
xcodebuild docbuild -project "Half.xcodeproj" -scheme "Half" -destination "generic/platform=iOS" -derivedDataPath "${TMPDIR}/.docbuild" 2>&1 | tee "${TMPDIR}/Logs/Build.log"
DOCC_ARCHIVE="$(find "${TMPDIR}/.docbuild" -type d -name "Half.doccarchive")"
mv "${DOCC_ARCHIVE%/}" "${TMPDIR}/Output/Half.doccarchive"
- name: Create Zip
run: |
cd "${TMPDIR}/Output"
zip -rX Half.doccarchive.zip Half.doccarchive 2>&1 | tee "${TMPDIR}/Logs/Zip.log"
- name: Upload Zip
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ github.event.release.upload_url }}
asset_path: ${{ env.TMPDIR }}/Output/Half.doccarchive.zip
asset_name: Half.doccarchive.zip
asset_content_type: application/zip
- name: Create Tar
run: |
cd "${TMPDIR}/Output"
tar -zcvf Half.doccarchive.tar.gz Half.doccarchive 2>&1 | tee "${TMPDIR}/Logs/Tar.log"
- name: Upload Tar
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ github.event.release.upload_url }}
asset_path: ${{ env.TMPDIR }}/Output/Half.doccarchive.tar.gz
asset_name: Half.doccarchive.tar.gz
asset_content_type: application/gzip
- name: Upload Logs
uses: actions/upload-artifact@v3
if: always()
with:
name: DocumentationLogs
path: ${{ env.TMPDIR }}/Logs/*.log