Skip to content

Commit b6ab1b8

Browse files
committed
github ci/cd added. remain channels are implemented.:
1 parent 180d3a2 commit b6ab1b8

File tree

246 files changed

+21216
-345
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

246 files changed

+21216
-345
lines changed

.github/workflow/debug-app.yml

Lines changed: 81 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,81 @@
1+
name: ATSY Cast Release Building
2+
3+
on:
4+
push:
5+
tags:
6+
- '*'
7+
8+
jobs:
9+
10+
build_start:
11+
12+
name: Build Debug Start
13+
runs-on: ubuntu-latest
14+
15+
steps:
16+
17+
- name: Check Out Branch
18+
uses: actions/checkout@v2.3.4
19+
20+
- name: Tag Version
21+
run: |
22+
echo "RELEASE_VERSION=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV
23+
24+
- name: Notify to Developer
25+
uses: wei/curl@v1
26+
with:
27+
args: curl -G ${{ secrets.TELEGRAM_BOT_URL }} --data-urlencode 'message=ATSY Cast Version - ${{ env.RELEASE_VERSION }} Debug Build Start'
28+
29+
build_release:
30+
31+
needs: build_start
32+
name: Build Release
33+
runs-on: ubuntu-18.04
34+
env:
35+
APP_CONFIG_FILE_BASE64: ${{ secrets.APP_CONFIG_FILE }}
36+
DEBUG_KEYSTORE_BASE64: ${{ secrets.DEBUG_KEYSTORE }}
37+
DEBUG_PLAY_SERVICE_BASE64: ${{ secrets.DEBUG_PLAY_SERVICE }}
38+
39+
steps:
40+
41+
- name: Check Out Branch
42+
uses: actions/checkout@v2.3.4
43+
44+
- run: touch local.properties
45+
- run: echo $APP_CONFIG_FILE_BASE64 | base64 --decode > local.properties
46+
- run: touch debug-keystore.jks
47+
- run: echo $DEBUG_KEYSTORE_BASE64 | base64 --decode > debug-keystore.jks
48+
- run: touch tv/google-services.json
49+
- run: echo $DEBUG_PLAY_SERVICE_BASE64 | base64 --dcode > tv/google-services.json
50+
51+
- name: Tag Version
52+
run: |
53+
echo "RELEASE_VERSION=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV
54+
55+
- name: Setup Java JDK
56+
uses: actions/setup-java@v1
57+
with:
58+
java-version: 1.8
59+
60+
- name: Build Debug
61+
run: bash ./gradlew assemblelocalDebug --stacktrace
62+
63+
- name: Upload Debug APK to CDN
64+
uses: wei/curl@v1
65+
with:
66+
args: --location --request POST ${{ secrets.FILE_UPLOAD_URL }} -F 'file=@app/build/outputs/apk/release/${{ env.RELEASE_VERSION }}/atsy-cast-debug-local.apk;type=application/vnd.android.package-archive' --form 'version=${{ env.RELEASE_VERSION }}' --form 'apk_name=ATSY Cast - New' --form 'file_name=atsy-cast-debug' --form 'is_home_version=true' --form 'update_name=atsy-cast-debug'
67+
68+
- name: Notift Debug status
69+
if: always()
70+
uses: xinthink/action-telegram@v1.1
71+
with:
72+
botToken: ${{ secrets.BOT_TOKEN }}
73+
chatId: ${{ secrets.KH_CHAT_ID }}
74+
jobStatus: ${{ job.status }}
75+
skipSuccess: false
76+
77+
- name: Notify build_debug status
78+
if: always()
79+
uses: wei/curl@v1
80+
with:
81+
args: curl -G ${{ secrets.TELEGRAM_BOT_URL }} --data-urlencode 'message=ATSY Cast - ${{ env.RELEASE_VERSION }} Build Debug Completed.'

.github/workflow/home-app.yml

Lines changed: 90 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,90 @@
1+
name: ATSY Cast Release Building
2+
3+
on:
4+
push:
5+
tags:
6+
- '*'
7+
8+
jobs:
9+
10+
build_start:
11+
12+
name: Build Home Start
13+
runs-on: ubuntu-latest
14+
15+
steps:
16+
17+
- name: Check Out Branch
18+
uses: actions/checkout@v2.3.4
19+
20+
- name: Tag Version
21+
run: |
22+
echo "RELEASE_VERSION=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV
23+
24+
- name: Notify to Developer
25+
uses: wei/curl@v1
26+
with:
27+
args: curl -G ${{ secrets.TELEGRAM_BOT_URL }} --data-urlencode 'message=ATSY Cast Version - ${{ env.RELEASE_VERSION }} Home Build Start'
28+
29+
build_release:
30+
31+
needs: build_start
32+
name: Build Debug
33+
runs-on: ubuntu-18.04
34+
env:
35+
APP_CONFIG_FILE_BASE64: ${{ secrets.APP_CONFIG_FILE }}
36+
RELEASE_KEYSTORE_BASE64: ${{ secrets.RELEASE_KEYSTORE }}
37+
HOME_PLAY_SERVICE_BASE64: ${{ secrets.HOME_PLAY_SERVICE }}
38+
39+
steps:
40+
41+
- name: Check Out Branch
42+
uses: actions/checkout@v2.3.4
43+
44+
- run: touch local.properties
45+
- run: echo $APP_CONFIG_FILE_BASE64 | base64 --decode > local.properties
46+
- run: touch release-keystore.jks
47+
- run: echo $RELEASE_KEYSTORE_BASE64 | base64 --decode > release-keystore.jks
48+
- run: touch tv/google-services.json
49+
- run: echo $HOME_PLAY_SERVICE_BASE64 | base64 --dcode > tv/google-services.json
50+
51+
- name: Tag Version
52+
run: |
53+
echo "RELEASE_VERSION=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV
54+
55+
- name: Setup Java JDK
56+
uses: actions/setup-java@v1
57+
with:
58+
java-version: 1.8
59+
60+
- name: Build Home
61+
run: bash ./gradlew assembleprodHome --stacktrace
62+
63+
- name: Send Home APK to Tester
64+
uses: wzieba/Firebase-Distribution-Github-Action@v1.3.2
65+
with:
66+
appId: ${{ secrets.FIREBASE_HOME_APP_ID }}
67+
token: ${{ secrets.FIREBASE_TOKEN }}
68+
groups: home
69+
releaseNotesFile: RELEASE_NOTE.txt
70+
file: app/build/outputs/apk/release/${{ env.RELEASE_VERSION }}/atsy-cast-home.apk
71+
72+
- name: Upload Home APK to CDN
73+
uses: wei/curl@v1
74+
with:
75+
args: --location --request POST ${{ secrets.FILE_UPLOAD_URL }} -F 'file=@app/build/outputs/apk/release/${{ env.RELEASE_VERSION }}/atsy-cast-home.apk;type=application/vnd.android.package-archive' --form 'version=${{ env.RELEASE_VERSION }}' --form 'apk_name=ATSY Cast - New' --form 'file_name=atsy-cast' --form 'is_home_version=true' --form 'update_name=home'
76+
77+
- name: Notift Home status
78+
if: always()
79+
uses: xinthink/action-telegram@v1.1
80+
with:
81+
botToken: ${{ secrets.BOT_TOKEN }}
82+
chatId: ${{ secrets.KH_CHAT_ID }}
83+
jobStatus: ${{ job.status }}
84+
skipSuccess: false
85+
86+
- name: Notify build_home status
87+
if: always()
88+
uses: wei/curl@v1
89+
with:
90+
args: curl -G ${{ secrets.TELEGRAM_BOT_URL }} --data-urlencode 'message=ATSY Cast - ${{ env.RELEASE_VERSION }} Build Home Completed.'

.github/workflow/release-app.yml

Lines changed: 90 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,90 @@
1+
name: ATSY Cast Release Building
2+
3+
on:
4+
push:
5+
tags:
6+
- '*'
7+
8+
jobs:
9+
10+
build_start:
11+
12+
name: Build Release Start
13+
runs-on: ubuntu-latest
14+
15+
steps:
16+
17+
- name: Check Out Branch
18+
uses: actions/checkout@v2.3.4
19+
20+
- name: Tag Version
21+
run: |
22+
echo "RELEASE_VERSION=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV
23+
24+
- name: Notify to Developer
25+
uses: wei/curl@v1
26+
with:
27+
args: curl -G ${{ secrets.TELEGRAM_BOT_URL }} --data-urlencode 'message=ATSY Cast Version - ${{ env.RELEASE_VERSION }} Release Build Start'
28+
29+
build_release:
30+
31+
needs: build_start
32+
name: Build Release
33+
runs-on: ubuntu-18.04
34+
env:
35+
APP_CONFIG_FILE_BASE64: ${{ secrets.APP_CONFIG_FILE }}
36+
RELEASE_KEYSTORE_BASE64: ${{ secrets.RELEASE_KEYSTORE }}
37+
RELEASE_PLAY_SERVICE_BASE64: ${{ secrets.RELEASE_PLAY_SERVICE }}
38+
39+
steps:
40+
41+
- name: Check Out Branch
42+
uses: actions/checkout@v2.3.4
43+
44+
- run: touch local.properties
45+
- run: echo $APP_CONFIG_FILE_BASE64 | base64 --decode > local.properties
46+
- run: touch release-keystore.jks
47+
- run: echo $RELEASE_KEYSTORE_BASE64 | base64 --decode > release-keystore.jks
48+
- run: touch tv/google-services.json
49+
- run: echo $RELEASE_PLAY_SERVICE_BASE64 | base64 --dcode > tv/google-services.json
50+
51+
- name: Tag Version
52+
run: |
53+
echo "RELEASE_VERSION=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV
54+
55+
- name: Setup Java JDK
56+
uses: actions/setup-java@v1
57+
with:
58+
java-version: 1.8
59+
60+
- name: Build Release
61+
run: bash ./gradlew assembleprodRelease --stacktrace
62+
63+
- name: Send Release APK to Tester
64+
uses: wzieba/Firebase-Distribution-Github-Action@v1.3.2
65+
with:
66+
appId: ${{ secrets.FIREBASE_RELEASE_APP_ID }}
67+
token: ${{ secrets.FIREBASE_TOKEN }}
68+
groups: release
69+
releaseNotesFile: RELEASE_NOTE.txt
70+
file: app/build/outputs/apk/release/${{ env.RELEASE_VERSION }}/atsy-cast.apk
71+
72+
- name: Upload Release APK to CDN
73+
uses: wei/curl@v1
74+
with:
75+
args: --location --request POST ${{ secrets.FILE_UPLOAD_URL }} -F 'file=@app/build/outputs/apk/release/${{ env.RELEASE_VERSION }}/atsy-cast.apk;type=application/vnd.android.package-archive' --form 'version=${{ env.RELEASE_VERSION }}' --form 'apk_name=ATSY Cast - New' --form 'file_name=atsy-cast' --form 'update_name=release'
76+
77+
- name: Notift Release status
78+
if: always()
79+
uses: xinthink/action-telegram@v1.1
80+
with:
81+
botToken: ${{ secrets.BOT_TOKEN }}
82+
chatId: ${{ secrets.KH_CHAT_ID }}
83+
jobStatus: ${{ job.status }}
84+
skipSuccess: false
85+
86+
- name: Notify build_release status
87+
if: always()
88+
uses: wei/curl@v1
89+
with:
90+
args: curl -G ${{ secrets.TELEGRAM_BOT_URL }} --data-urlencode 'message=ATSY Cast - ${{ env.RELEASE_VERSION }} Build Release Completed.'

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,3 +16,5 @@ local.properties
1616
git-push.gradle
1717
schemas
1818
utils.txt
19+
debug-keystore.jks
20+
release-keystore.jks

.idea/gradle.xml

Lines changed: 2 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

2d/.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
/build

0 commit comments

Comments
 (0)