Skip to content

Commit 1684d84

Browse files
authored
Merge pull request #46 from befovy/develop
ci: add android ios release ci
2 parents 9227132 + 052418e commit 1684d84

File tree

6 files changed

+109
-9
lines changed

6 files changed

+109
-9
lines changed
Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
name: Android Release
2+
3+
on:
4+
push:
5+
tags:
6+
- 'f*'
7+
8+
jobs:
9+
build:
10+
11+
runs-on: ubuntu-latest
12+
13+
steps:
14+
- uses: actions/checkout@v2
15+
- name: set up JDK 1.8
16+
uses: actions/setup-java@v1
17+
with:
18+
java-version: 1.8
19+
20+
- name: Setup ndk
21+
run: |
22+
yes 2>/dev/null | sudo $ANDROID_HOME/tools/bin/sdkmanager --install "ndk;16.1.4479499" "cmake;3.10.2.4988404"
23+
24+
- name: Init extra for android
25+
run: |
26+
export ANDROID_NDK=$ANDROID_HOME/ndk/16.1.4479499/
27+
bash init-android.sh
28+
bash init/init-android-boringssl.sh
29+
bash init/init-android-libsrt.sh
30+
31+
- name: Build ssl and ffmpeg
32+
run: |
33+
cd android/contrib
34+
export ANDROID_NDK=$ANDROID_HOME/ndk/16.1.4479499/
35+
bash compile-boringssl.sh all
36+
wget --no-check-certificate https://raw.githubusercontent.com/FFmpeg/gas-preprocessor/master/gas-preprocessor.pl
37+
chmod +x gas-preprocessor.pl && sudo mv gas-preprocessor.pl /usr/local/bin/
38+
bash compile-ffmpeg.sh all
39+
40+
- name: Gradle build and publish
41+
working-directory: android/ijkplayer
42+
env:
43+
BINTRAY_USER: befovy
44+
BINTRAY_APIKEY: ${{ secrets.BINTRAY_APIKEY }}
45+
run: |
46+
export ANDROID_NDK=$ANDROID_HOME/ndk/16.1.4479499/
47+
./gradlew build
48+
./gradlew bintrayUpload

.github/workflows/ios_release.yml

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
name: iOS Release
2+
3+
on:
4+
push:
5+
tags:
6+
- 'f*'
7+
8+
jobs:
9+
build:
10+
runs-on: macos-latest
11+
12+
steps:
13+
- uses: actions/checkout@v2
14+
15+
- name: Init extra for iOS
16+
run: |
17+
bash init-ios-openssl.sh
18+
bash init-ios.sh
19+
20+
- name: Build ssl and ffmpeg
21+
working-directory: ios
22+
run: |
23+
bash compile-openssl.sh all
24+
bash compile-ffmpeg.sh all
25+
26+
- name: XCode build ijkplayer
27+
working-directory: ios/IJKMediaPlayer
28+
run: xcodebuild -project IJKMediaPlayer.xcodeproj -configuration Release -scheme Universal
29+
30+
- name: Create Release
31+
id: create_release
32+
uses: actions/create-release@v1
33+
env:
34+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
35+
with:
36+
tag_name: ${{ github.ref }}
37+
release_name: Release ${{ github.ref }}
38+
draft: false
39+
prerelease: false
40+
41+
- name: Upload iOS Framework
42+
uses: actions/upload-release-asset@v1
43+
env:
44+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
45+
with:
46+
upload_url: ${{ steps.create_release.outputs.upload_url }}
47+
asset_path: ./ios/CocoaPodsPub/IJKMediaPlayer.tar.gz
48+
asset_name: IJKMediaPlayer.tar.gz
49+
asset_content_type: application/gzip

CHANGELOG.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ All notable changes to this project will be documented in this file. See [standa
55

66
---
77

8-
## 0.7.5 (2020-07-03)
8+
## 0.7.6 (2020-07-03)
99

1010
* fix: update position with duration value when playback complete ([f3d27d8](https://github.com/befovy/ijkplayer/commit/f3d27d832ba0a3472bb59c129c2c65591f8855d4))
1111
* fix: use cmake configure generate ijkversion.h ([d252733](https://github.com/befovy/ijkplayer/commit/d252733c36cc05a2fc22ea23c99c04b4872b9f72))

android/ijkplayer/gradle.properties

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,8 @@
1717
# http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
1818
# org.gradle.parallel=true
1919

20-
VERSION_NAME=0.7.5
21-
VERSION_CODE=000705
20+
VERSION_NAME=0.7.6
21+
VERSION_CODE=000706
2222
GROUP=com.befovy.fijkplayer
2323

2424
# http://central.sonatype.org/pages/requirements.html

android/ijkplayer/tools/gradle-bintray-upload.gradle

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,11 @@ version = VERSION_NAME
2222

2323

2424
Properties properties = new Properties()
25-
properties.load(project.rootProject.file('local.properties').newDataInputStream())
26-
def bintray_user = properties.getProperty('BINTRAY_USER')
27-
def bintray_apikey = properties.getProperty('BINTRAY_APIKEY')
25+
if (project.rootProject.file('local.properties').exists()) {
26+
properties.load(project.rootProject.file('local.properties').newDataInputStream())
27+
}
28+
def bintray_user = properties.getProperty('BINTRAY_USER', null)
29+
def bintray_apikey = properties.getProperty('BINTRAY_APIKEY', null)
2830

2931
bintray {
3032
user = bintray_user ? bintray_user : project.hasProperty('BINTRAY_USER') ? BINTRAY_USER : System.getenv('BINTRAY_USER')

ios/CocoaPodsPub/BIJKPlayer.podspec

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ Pod::Spec.new do |spec|
1616
#
1717

1818
spec.name = "BIJKPlayer"
19-
spec.version = "0.7.3"
19+
spec.version = "0.7.6"
2020
spec.summary = "ijkplayer iOS video player SDK"
2121

2222
spec.author = { "befovy" => "[email protected]" }
@@ -74,8 +74,9 @@ Pod::Spec.new do |spec|
7474
# Specify the location from where the source should be retrieved.
7575
# Supports git, hg, bzr, svn and HTTP.
7676
#
77-
78-
spec.source = { :http => "https://dl.bintray.com/befovytray/bijkplayer/f0.7.5/IJKMediaPlayer.tar.gz" }
77+
78+
spec.source = { :http => "https://github.com/befovy/ijkplayer/releases/download/f0.7.6/IJKMediaPlayer.tar.gz" }
79+
7980
# ――― Source Code ―――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――― #
8081
#
8182
# CocoaPods is smart about how it includes source code. For source files

0 commit comments

Comments
 (0)