Skip to content

Commit

Permalink
add test build frameowrk script
Browse files Browse the repository at this point in the history
  • Loading branch information
mjtalbot committed Nov 23, 2021
1 parent 6afdc41 commit 2d5aabd
Showing 1 changed file with 103 additions and 0 deletions.
103 changes: 103 additions & 0 deletions .github/workflows/test_build_frameworks.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,103 @@
name: Publish to Cocoapods


jobs:
create_podspec_file:
name: Create RiveRuntime.podspec
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Add RELEASE_VERSION to env
run: echo "RELEASE_VERSION=0.0.9" >> $GITHUB_ENV
- 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: 0.0.1
- name: Upload artifact
uses: actions/upload-artifact@v2
with:
name: RiveRuntime.podspec
path: RiveRuntime.podspec

build_framework:
name: Create RiveRuntime.xcframework
runs-on: macos-11
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 ./.github/scripts/buildFramework.sh -t iphoneos -c Release
- id: build_iphonesimulator
name: Build release iphonesimulator framework
run: sh ./.github/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 ./.github/scripts/mergeFrameworks.sh -c Release
- name: Upload artifact
uses: actions/upload-artifact@v2
with:
name: RiveRuntime.xcframework
path: archive/RiveRuntime.xcframework


build_pod:
name: Update podspec repository
runs-on: macos-11
timeout-minutes: 10
needs: [create_podspec_file, build_framework]
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: Download RELEASE_VERSION
uses: actions/download-artifact@v2
with:
name: RELEASE_VERSION
- name: Add RELEASE_VERSION to env
run: echo "RELEASE_VERSION=$(cat RELEASE_VERSION)" >> $GITHUB_ENV
- name: Push pod to test-ios repo
run: |
git status
git config --local user.email 'hello@rive.app'
git config --local user.name ${{ github.actor }}
git add .
git commit -m "Update podspec repo tag:${{ env.RELEASE_VERSION }}"
git push
git tag v${{ env.RELEASE_VERSION }}
git push origin v${{ env.RELEASE_VERSION }}
env:
API_TOKEN_GITHUB: ${{ secrets.RIVE_REPO_PAT }}

0 comments on commit 2d5aabd

Please sign in to comment.