Skip to content

Commit

Permalink
update github package ci
Browse files Browse the repository at this point in the history
  • Loading branch information
CarGuo committed Oct 30, 2024
1 parent 9040341 commit 2a3b325
Show file tree
Hide file tree
Showing 3 changed files with 90 additions and 11 deletions.
15 changes: 5 additions & 10 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,22 +33,17 @@ on:

jobs:
publish:
name: Publish to Github Packages
name: Publish to MavenLocal
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
- uses: actions/checkout@v4
- uses: actions/setup-java@v4
- uses: actions/checkout@v3
- uses: actions/setup-java@v3
with:
distribution: 'zulu'
java-version: 21
- uses: gradle/gradle-build-action@v2
- name: Publish package
run: ./gradlew publish
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
arguments: publishToMavenLocal

build:
name: Build
Expand Down
18 changes: 18 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,3 +24,21 @@ jobs:
with:
artifacts: "app/build/outputs/apk/release/app-release.apk"
token: ${{ secrets.GITHUB_TOKEN }}

publish:
name: Publish To Github Packages
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
- uses: actions/checkout@v4
- uses: actions/setup-java@v4
with:
distribution: 'zulu'
java-version: 21
- uses: gradle/gradle-build-action@v2
- name: Publish Package
run: ./gradlew publish
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
68 changes: 67 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,73 @@
#### [--- 版本更新说明 --- ](https://github.com/CarGuo/GSYVideoPlayer/blob/master/doc/UPDATE_VERSION.md)


### 1、Jitpack 引入方法(推荐, JCenter 即将关闭)
### 1、新增 Github Package 依赖方式

**由于 Jitpack 经常存在历史包随机丢失问题,所以新增 Github Package 依赖方式,使用方式如下**

```
allprojects {
repositories {
...
maven {url 'https://maven.pkg.github.com/CarGuo/GSYVideoPlayer'}
maven { url "https://maven.aliyun.com/repository/public" }
}
}
```


**你可以选择下面三种的其中一种,在module下的build.gradle添加。**

#### A、直接引入
```
//完整版引入
implementation 'com.shuyu:gsyvideoplayer:9.1.0'
//是否需要AliPlayer模式
implementation 'com.shuyu.gsyvideoplayer-aliplay:9.1.0'
```

#### B、添加java和你想要的so支持:

```
implementation 'com.shuyu.gsyvideoplayer-java:9.1.0'
//是否需要ExoPlayer模式
implementation 'com.shuyu.gsyvideoplayer-exo2:9.1.0'
//是否需要AliPlayer模式
implementation 'com.shuyu.gsyvideoplayer-aliplay:9.1.0'
//根据你的需求ijk模式的so
implementation 'com.shuyu.gsyvideoplayer-armv5:9.1.0'
implementation 'com.shuyu.gsyvideoplayer-armv7a:9.1.0'
implementation 'com.shuyu.gsyvideoplayer-arm64:9.1.0'
implementation 'com.shuyu.gsyvideoplayer-x86:9.1.0'
implementation 'com.shuyu.gsyvideoplayer-x64:9.1.0'
```

#### C、支持其他格式协议的(mpeg,rtsp, concat、crypto协议,支持 16k Page Size)

A、B普通版本支持263/264/265等,对于mpeg编码会有声音无画面情况。
C 引入的so支持mpeg编码和其他补充协议,但是so包相对变大。

```
implementation 'com.shuyu.gsyvideoplayer-java:9.1.0'
//是否需要ExoPlayer模式
implementation 'com.shuyu.gsyvideoplayer-exo2:9.1.0'
//是否需要AliPlayer模式
implementation 'com.shuyu.gsyvideoplayer-aliplay:9.1.0'
//更多ijk的编码支持
implementation 'com.shuyu.gsyvideoplayer-ex_so:9.1.0'
```

### 2、Jitpack 引入方法(JCenter 已被官方关闭)


#### First、在project下的build.gradle添加
Expand Down

0 comments on commit 2a3b325

Please sign in to comment.