Skip to content

Commit

Permalink
Merge pull request bilibili#46 from befovy/develop
Browse files Browse the repository at this point in the history
ci: add android ios release ci
  • Loading branch information
befovy committed Jul 3, 2020
2 parents 9227132 + 052418e commit 1684d84
Show file tree
Hide file tree
Showing 6 changed files with 109 additions and 9 deletions.
48 changes: 48 additions & 0 deletions .github/workflows/android_release.yml
Original file line number Diff line number Diff line change
@@ -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
49 changes: 49 additions & 0 deletions .github/workflows/ios_release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
name: iOS Release

on:
push:
tags:
- 'f*'

jobs:
build:
runs-on: macos-latest

steps:
- uses: actions/checkout@v2

- name: Init extra for iOS
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

- 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
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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))
Expand Down
4 changes: 2 additions & 2 deletions android/ijkplayer/gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
8 changes: 5 additions & 3 deletions android/ijkplayer/tools/gradle-bintray-upload.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -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')
Expand Down
7 changes: 4 additions & 3 deletions ios/CocoaPodsPub/BIJKPlayer.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -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" }
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 1684d84

Please sign in to comment.