forked from androidx/media
-
Notifications
You must be signed in to change notification settings - Fork 0
71 lines (54 loc) · 2.54 KB
/
cd.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
name: "Release"
on:
workflow_dispatch:
jobs:
build:
name: "Build Androix-media3"
runs-on: ubuntu-22.04
env:
MAVEN_AWS_KEY: ${{secrets.MIREGO_MAVEN_AWS_ACCESS_KEY_ID}}
MAVEN_AWS_SECRET: ${{secrets.MIREGO_MAVEN_AWS_SECRET_ACCESS_KEY}}
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Increment Version
run: |
version=$(sed -nr "s/^.+releaseVersion.*=.*'[0-9]+\.[0-9]+\.[0-9]+\.([0-9]+)'.*$/\1/p" constants.gradle)
new_version=$(printf '%04d\n' "$(expr $version + 1)")
sed -ri "s/^(.+releaseVersion.*=.*'[0-9]+\.[0-9]+\.[0-9]+\.)[0-9]+('.*)$/\1$new_version\2/g" constants.gradle
sed -ri "s/^(.*public static final String VERSION = \"[0-9]+\.[0-9]+\.[0-9]+\.)[0-9]+(\";.*)$/\1$new_version\2/g" libraries/common/src/main/java/androidx/media3/common/MediaLibraryInfo.java
full_version=$(sed -nr "s/^.+releaseVersion.*=.*'([0-9]+\.[0-9]+\.[0-9]+\.[0-9]+)'.*$/\1/p" constants.gradle)
git config --global user.name "$GITHUB_ACTOR"
git config --global user.email "$GITHUB_ACTOR@users.noreply.github.com"
git commit -am "Increment version to $full_version"
git push
- name: Configure Java
uses: actions/setup-java@v3
with:
distribution: "zulu"
java-version: 17
cache: "gradle"
- name: Build and publish exoplayer
run: cd libraries/exoplayer && ../../gradlew publish
- name: Build and publish dash
run: cd libraries/exoplayer_dash && ../../gradlew publish
- name: Build and publish hls
run: cd libraries/exoplayer_hls && ../../gradlew publish
- name: Build and publish ima
run: cd libraries/exoplayer_ima && ../../gradlew publish
- name: Build and publish ui
run: cd libraries/ui && ../../gradlew publish
- name: Build and publish common
run: cd libraries/common && ../../gradlew publish
- name: Build and publish datasource
run: cd libraries/datasource && ../../gradlew publish
- name: Build and publish extractor
run: cd libraries/extractor && ../../gradlew publish
- name: Build and publish decoder
run: cd libraries/decoder && ../../gradlew publish
- name: Build and publish database
run: cd libraries/database && ../../gradlew publish
- name: Build and publish okhttp
run: cd libraries/datasource_okhttp && ../../gradlew publish
- name: Build and publish container
run: cd libraries/container && ../../gradlew publish