From 9141880fdc2f051f8d171a8bb7715267e78d121d Mon Sep 17 00:00:00 2001 From: befovy Date: Fri, 3 Jul 2020 12:14:36 +0800 Subject: [PATCH 1/4] ci: add android release ci --- .github/workflows/android_release.yml | 48 +++++++++++++++++++++++++++ 1 file changed, 48 insertions(+) create mode 100644 .github/workflows/android_release.yml diff --git a/.github/workflows/android_release.yml b/.github/workflows/android_release.yml new file mode 100644 index 0000000000..d54fbd8f0c --- /dev/null +++ b/.github/workflows/android_release.yml @@ -0,0 +1,48 @@ +name: Android Release + +on: + push: + tags: + - 'f*' + +jobs: + build: + + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v2 + - name: set up JDK 1.8 + uses: actions/setup-java@v1 + with: + java-version: 1.8 + + - name: Setup ndk + run: | + yes 2>/dev/null | sudo $ANDROID_HOME/tools/bin/sdkmanager --install "ndk;16.1.4479499" "cmake;3.10.2.4988404" + + - name: Init extra for android + run: | + export ANDROID_NDK=$ANDROID_HOME/ndk/16.1.4479499/ + bash init-android.sh + bash init/init-android-boringssl.sh + bash init/init-android-libsrt.sh + + - name: Build ssl and ffmpeg + run: | + cd android/contrib + export ANDROID_NDK=$ANDROID_HOME/ndk/16.1.4479499/ + bash compile-boringssl.sh all + wget --no-check-certificate https://raw.githubusercontent.com/FFmpeg/gas-preprocessor/master/gas-preprocessor.pl + chmod +x gas-preprocessor.pl && sudo mv gas-preprocessor.pl /usr/local/bin/ + bash compile-ffmpeg.sh all + + - name: Gradle build and publish + working-directory: android/ijkplayer + env: + BINTRAY_USER: befovy + BINTRAY_APIKEY: ${{ secrets.BINTRAY_APIKEY }} + run: | + export ANDROID_NDK=$ANDROID_HOME/ndk/16.1.4479499/ + ./gradlew build + ./gradlew bintrayUpload \ No newline at end of file From 6efcef198e3b5f9c6f4252456f521650a00578a5 Mon Sep 17 00:00:00 2001 From: befovy Date: Fri, 3 Jul 2020 12:23:00 +0800 Subject: [PATCH 2/4] ci: add ios release ci --- .github/workflows/ios_release.yml | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 .github/workflows/ios_release.yml diff --git a/.github/workflows/ios_release.yml b/.github/workflows/ios_release.yml new file mode 100644 index 0000000000..d29b87d20b --- /dev/null +++ b/.github/workflows/ios_release.yml @@ -0,0 +1,31 @@ +name: iOS Release + +on: + push: + tags: + - 'f*' + branches: [ master, main ] + pull_request: + branches: [ master, main ] + +jobs: + build: + runs-on: macos-latest + + steps: + - uses: actions/checkout@v2 + + - name: Init extra for android + run: | + bash init-ios-openssl.sh + bash init-ios.sh + + - name: Build ssl and ffmpeg + working-directory: ios + run: | + bash compile-openssl.sh all + bash compile-ffmpeg.sh all + + - name: XCode build ijkplayer + working-directory: ios/IJKMediaPlayer + run: xcodebuild -project IJKMediaPlayer.xcodeproj -configuration Release -scheme Universal \ No newline at end of file From 2858b90f77e22667c5c4a9df510427115bd8ce86 Mon Sep 17 00:00:00 2001 From: befovy Date: Fri, 3 Jul 2020 12:48:32 +0800 Subject: [PATCH 3/4] fix: bintray upload load local.properties error --- .github/workflows/ios_release.yml | 2 +- android/ijkplayer/tools/gradle-bintray-upload.gradle | 8 +++++--- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/.github/workflows/ios_release.yml b/.github/workflows/ios_release.yml index d29b87d20b..18c15c588d 100644 --- a/.github/workflows/ios_release.yml +++ b/.github/workflows/ios_release.yml @@ -15,7 +15,7 @@ jobs: steps: - uses: actions/checkout@v2 - - name: Init extra for android + - name: Init extra for iOS run: | bash init-ios-openssl.sh bash init-ios.sh diff --git a/android/ijkplayer/tools/gradle-bintray-upload.gradle b/android/ijkplayer/tools/gradle-bintray-upload.gradle index 756047b338..e5a23e1dc7 100644 --- a/android/ijkplayer/tools/gradle-bintray-upload.gradle +++ b/android/ijkplayer/tools/gradle-bintray-upload.gradle @@ -22,9 +22,11 @@ version = VERSION_NAME Properties properties = new Properties() -properties.load(project.rootProject.file('local.properties').newDataInputStream()) -def bintray_user = properties.getProperty('BINTRAY_USER') -def bintray_apikey = properties.getProperty('BINTRAY_APIKEY') +if (project.rootProject.file('local.properties').exists()) { + properties.load(project.rootProject.file('local.properties').newDataInputStream()) +} +def bintray_user = properties.getProperty('BINTRAY_USER', null) +def bintray_apikey = properties.getProperty('BINTRAY_APIKEY', null) bintray { user = bintray_user ? bintray_user : project.hasProperty('BINTRAY_USER') ? BINTRAY_USER : System.getenv('BINTRAY_USER') From 052418ea34fc55b6f2cb8f9c12fe616227fc9249 Mon Sep 17 00:00:00 2001 From: befovy Date: Fri, 3 Jul 2020 13:29:39 +0800 Subject: [PATCH 4/4] ci: ios release upload-release-asset --- .github/workflows/ios_release.yml | 26 ++++++++++++++++++++++---- CHANGELOG.md | 2 +- android/ijkplayer/gradle.properties | 4 ++-- ios/CocoaPodsPub/BIJKPlayer.podspec | 7 ++++--- 4 files changed, 29 insertions(+), 10 deletions(-) diff --git a/.github/workflows/ios_release.yml b/.github/workflows/ios_release.yml index 18c15c588d..f250ef32a7 100644 --- a/.github/workflows/ios_release.yml +++ b/.github/workflows/ios_release.yml @@ -4,9 +4,6 @@ on: push: tags: - 'f*' - branches: [ master, main ] - pull_request: - branches: [ master, main ] jobs: build: @@ -28,4 +25,25 @@ jobs: - name: XCode build ijkplayer working-directory: ios/IJKMediaPlayer - run: xcodebuild -project IJKMediaPlayer.xcodeproj -configuration Release -scheme Universal \ No newline at end of file + run: xcodebuild -project IJKMediaPlayer.xcodeproj -configuration Release -scheme Universal + + - name: Create Release + id: create_release + uses: actions/create-release@v1 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + tag_name: ${{ github.ref }} + release_name: Release ${{ github.ref }} + draft: false + prerelease: false + + - name: Upload iOS Framework + uses: actions/upload-release-asset@v1 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + upload_url: ${{ steps.create_release.outputs.upload_url }} + asset_path: ./ios/CocoaPodsPub/IJKMediaPlayer.tar.gz + asset_name: IJKMediaPlayer.tar.gz + asset_content_type: application/gzip diff --git a/CHANGELOG.md b/CHANGELOG.md index 0246898dcb..b2f73a4a73 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,7 +5,7 @@ All notable changes to this project will be documented in this file. See [standa --- -## 0.7.5 (2020-07-03) +## 0.7.6 (2020-07-03) * fix: update position with duration value when playback complete ([f3d27d8](https://github.com/befovy/ijkplayer/commit/f3d27d832ba0a3472bb59c129c2c65591f8855d4)) * fix: use cmake configure generate ijkversion.h ([d252733](https://github.com/befovy/ijkplayer/commit/d252733c36cc05a2fc22ea23c99c04b4872b9f72)) diff --git a/android/ijkplayer/gradle.properties b/android/ijkplayer/gradle.properties index fdba9c36f6..e25783be23 100644 --- a/android/ijkplayer/gradle.properties +++ b/android/ijkplayer/gradle.properties @@ -17,8 +17,8 @@ # http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects # org.gradle.parallel=true -VERSION_NAME=0.7.5 -VERSION_CODE=000705 +VERSION_NAME=0.7.6 +VERSION_CODE=000706 GROUP=com.befovy.fijkplayer # http://central.sonatype.org/pages/requirements.html diff --git a/ios/CocoaPodsPub/BIJKPlayer.podspec b/ios/CocoaPodsPub/BIJKPlayer.podspec index 8e60da5e5e..3546a219f7 100644 --- a/ios/CocoaPodsPub/BIJKPlayer.podspec +++ b/ios/CocoaPodsPub/BIJKPlayer.podspec @@ -16,7 +16,7 @@ Pod::Spec.new do |spec| # spec.name = "BIJKPlayer" - spec.version = "0.7.3" + spec.version = "0.7.6" spec.summary = "ijkplayer iOS video player SDK" spec.author = { "befovy" => "befovy@gmail.com" } @@ -74,8 +74,9 @@ Pod::Spec.new do |spec| # Specify the location from where the source should be retrieved. # Supports git, hg, bzr, svn and HTTP. # - - spec.source = { :http => "https://dl.bintray.com/befovytray/bijkplayer/f0.7.5/IJKMediaPlayer.tar.gz" } + + spec.source = { :http => "https://github.com/befovy/ijkplayer/releases/download/f0.7.6/IJKMediaPlayer.tar.gz" } + # ――― Source Code ―――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――― # # # CocoaPods is smart about how it includes source code. For source files