apple-ijk-framework-beta #9
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: apple-ijk-framework-beta | |
on: | |
# push: | |
# branches: [master] | |
# pull_request: | |
# branches: [master] | |
workflow_dispatch: | |
jobs: | |
build: | |
name: build-apple-ijk-framework-beta | |
runs-on: macos-14 | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
submodules: recursive | |
ref: develop | |
- name: Read Tag Version | |
run: | | |
grep -m 1 VERSION_NAME= version.sh | awk -F = '{printf "VERSION=%s",$2}' | xargs > constants.env | |
echo "RELEAE_DATE=$(TZ=UTC-8 date +'%y%m%d%H%M%S')" >> constants.env | |
echo "TAG=k"$(grep "VERSION" constants.env | cut -d'=' -f2)"-beta-"$(grep "RELEAE_DATE" constants.env | cut -d'=' -f2) >> constants.env | |
cat constants.env | |
- name: Export Env | |
uses: cardinalby/export-env-action@v2 | |
with: | |
envFile: 'constants.env' | |
- run: brew install tree | |
- name: Download Pre Compiled Dependencies | |
run: | | |
./FFToolChain/main.sh install -p ios -l 'ass ffmpeg' | |
./FFToolChain/main.sh install -p macos -l 'ass ffmpeg' | |
./FFToolChain/main.sh install -p tvos -l 'ass ffmpeg' | |
- name: Pod Install | |
run: | | |
pod install --project-directory=examples/ios | |
pod install --project-directory=examples/macos | |
pod install --project-directory=examples/tvos | |
- name: Build iOS Framework | |
run: cd examples/ios && ./build-framework.sh | |
- name: Build macOS Framework | |
run: cd examples/macos && ./build-framework.sh | |
- name: Build tvOS Framework | |
run: cd examples/tvos && ./build-framework.sh | |
- name: Make xcframework | |
run: cd examples/xcframewrok && ./make-xcframework.sh | |
- name: Make podspec | |
run: cd examples/xcframewrok && ./make-podspec.sh | |
- name: Zip Frameworks | |
run: | | |
draft=FFToolChain/build/draft | |
dist=FFToolChain/build/dist | |
mkdir -p $draft | |
mkdir -p $dist | |
cp CHANGELOG.md $draft | |
cp README.md $draft | |
cp COPYING.LGPLv2.1 $draft | |
cp -pPR examples/xcframewrok/IJKMediaPlayerKit.xcframework $draft | |
cd $draft | |
mv COPYING.LGPLv2.1 LICENSE | |
zip -ryq IJKMediaPlayerKit.zip ./* | |
cd - | |
mv $draft/IJKMediaPlayerKit.zip $dist | |
- name: Create Release | |
env: | |
GH_TOKEN: ${{ github.token }} | |
run: | | |
gh release create ${{ env.TAG }} --target develop -t "👏👏 IJKMediaPlayerKit ${{ env.TAG }}" FFToolChain/build/dist/*.* |