Skip to content

Commit

Permalink
added build frameworks yaml
Browse files Browse the repository at this point in the history
  • Loading branch information
mjtalbot committed May 18, 2021
1 parent 8e471b4 commit e9d4751
Showing 1 changed file with 98 additions and 0 deletions.
98 changes: 98 additions & 0 deletions .github/workflows/build_frameworks.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,98 @@
name: Build Rive framework

on:
release:
types: [released]

jobs:
build_frameworks:
name: Create RiveRuntime.xcframework
runs-on: macos-latest
steps:
- name: Checkout
uses: actions/checkout@v2
with:
token: ${{ secrets.RIVE_REPO_PAT }}
submodules: recursive
- name: Init submodule
run: git submodule update --init
- id: build_iphoneos
name: Build release iphoneos framework
run: sh ./scripts/buildFramework.sh -t iphoneos -c Release
- id: build_iphonesimulator
name: Build release iphonesimulator framework
run: sh ./scripts/buildFramework.sh -t iphonesimulator -c Release
- id: merge_frameworks
if: steps.build_iphoneos.conclusion == 'success' && steps.build_iphonesimulator.conclusion == 'success'
name: Merge created frameworks
run: sh ./scripts/mergeFrameworks.sh -c Release
- name: Upload artifact
uses: actions/upload-artifact@v2
with:
name: RiveRuntime.xcframework
path: build/RiveRuntime.xcframework

create_podspec_file:
name: Create RiveRuntime.podspec
runs-on: macos-latest
steps:
- name: Checkout
uses: actions/checkout@v2
with:
token: ${{ secrets.RIVE_REPO_PAT }}
submodules: recursive
- name: Read podspec.txt file
uses: pCYSl5EDgo/cat@master
id: podspec
with:
path: .github/workflows/podspec.txt
- name: Create *.podspec
run: |
cat > RiveRuntime.podspec <<-EOF
${{ steps.podspec.outputs.text }}
EOF
env:
GITHUB_AUTHOR: ${{ github.actor }}
RELEASE_VERSION: ${{ github.event.release.tag_name }}
- name: Upload artifact
uses: actions/upload-artifact@v2
with:
name: RiveRuntime.podspec
path: RiveRuntime.podspec

upload_cocoapods:
name: Update podspec repository
runs-on: macos-latest
timeout-minutes: 10
needs: [create_podspec_file, build_frameworks]
steps:
- name: Checkout podspec repo
uses: actions/checkout@v2
with:
repository: rive-app/test-ios
token: ${{ secrets.RIVE_REPO_PAT }}
- name: Clean
run: |
rm -rf RiveRuntime.podspec
rm -rf RiveRuntime.xcframework
- name: Download framework artifact
uses: actions/download-artifact@v2
with:
name: RiveRuntime.xcframework
path: RiveRuntime.xcframework
- name: Download podspec artifact
uses: actions/download-artifact@v2
with:
name: RiveRuntime.podspec
- name: Lint pod
run: pod lib lint --allow-warnings
- name: Push pod to test-ios repo
run: |
git status
git config --local user.email '[email protected]'
git config --local user.name ${{ github.actor }}
git add .
git commit -m "Update podspec repo tag:${{ github.event.release.tag_name }}"
git push
env:
API_TOKEN_GITHUB: ${{ secrets.RIVE_REPO_PAT }}

0 comments on commit e9d4751

Please sign in to comment.