forked from OwnTube-tv/web-client
-
Notifications
You must be signed in to change notification settings - Fork 0
124 lines (110 loc) · 4.07 KB
/
google_play.yml
File metadata and controls
124 lines (110 loc) · 4.07 KB
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
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
name: Upload to Google Play
on:
workflow_call:
inputs:
owntube_source:
required: false
type: string
description: "The repository with OwnTube-tv/web-client code. Defaults to the source repository."
use_parent_repo_customizations:
required: false
type: boolean
description: "Should a parent repo be used for customizations? (Required for branded builds)"
isTV:
required: false
type: boolean
description: Upload TV app version?
customizations_env_content:
required: false
type: string
build_info:
required: true
type: string
track:
required: true
type: string
description: The track to release this version on
secrets:
KEYSTORE_PASSWORD:
required: true
description: The password to your keystore used to sign the .aab file
SIGNING_KEY_ALIAS:
required: true
description: The alias for the signing key from the keystore
SIGNING_KEY_PASSWORD:
required: true
description: The password to the signing key from the keystore
RELEASE_KEYSTORE_CONTENT_BASE64:
required: true
description: Contents of the keystore file
SERVICE_ACCOUNT_JSON:
required: true
description: The JSON corresponding to the service account attached to Google Play console
jobs:
google_play:
runs-on: ubuntu-latest
environment: owntube
steps:
- name: Checkout
uses: actions/checkout@v4
with:
repository: ${{ inputs.owntube_source || github.repository }}
- name: Checkout parent repo with customizations
uses: actions/checkout@v4
if: ${{ inputs.use_parent_repo_customizations }}
with:
path: customizations
- name: Setup Node 20
uses: actions/setup-node@v4
with:
node-version: 20.x
- name: Install Dependencies
run: cd OwnTube.tv/ && npm install
- name: Create .env File
id: create_env
if: ${{ inputs.customizations_env_content != '' }}
run: |
echo "BUNDLE_ID=$(echo "${{ inputs.customizations_env_content }}" | grep '^EXPO_PUBLIC_IOS_BUNDLE_IDENTIFIER=' | cut -d'=' -f2)" >> $GITHUB_OUTPUT
echo "${{ inputs.customizations_env_content }}" > ./OwnTube.tv/.env
- name: Expo Prebuild assets
env:
EXPO_PUBLIC_ANDROID_RELEASE_SIGNING_STORE_FILE_PASSWORD: ${{ secrets.KEYSTORE_PASSWORD }}
EXPO_PUBLIC_ANDROID_RELEASE_SIGNING_KEY_ALIAS: ${{ secrets.SIGNING_KEY_ALIAS }}
EXPO_PUBLIC_ANDROID_RELEASE_SIGNING_KEY_PASSWORD: ${{ secrets.SIGNING_KEY_PASSWORD }}
run: |
if [ "${{ inputs.isTV }}" == "true" ]; then
export EXPO_TV=1
fi
cd OwnTube.tv/ && npx expo prebuild --clean --platform android
- name: Set Up JDK
uses: actions/setup-java@v4
with:
distribution: "zulu"
java-version: "17"
cache: "gradle"
- name: Validate Gradle Wrapper
uses: gradle/actions/wrapper-validation@v4
- name: Inject Build Info
run: |
cat > ./OwnTube.tv/build-info.json << 'EOF'
${{ inputs.build_info }}
EOF
- name: Add keystore file
run: |
echo "${{ secrets.RELEASE_KEYSTORE_CONTENT_BASE64 }}" | base64 --decode > ./OwnTube.tv/android/app/release-key.jks
- name: Build app artifact
run: |
if [ "${{ inputs.isTV }}" == "true" ]; then
export EXPO_TV=1
fi
cd OwnTube.tv/android
./gradlew clean bundleRelease
- name: Upload app to Google Play
uses: r0adkll/upload-google-play@v1
with:
serviceAccountJsonPlainText: ${{ secrets.SERVICE_ACCOUNT_JSON }}
packageName: ${{ steps.create_env.outputs.BUNDLE_ID }}
releaseFiles: ./OwnTube.tv/android/app/build/outputs/bundle/release/app-release.aab
track: ${{ inputs.isTV == true && 'tv:' || '' }}${{ inputs.track }}
status: draft
inAppUpdatePriority: 1