Skip to content

Commit 14b5a19

Browse files
committed
Update CI/CD pipeline: add local properties setup and enhance GitHub release process
1 parent dc74b57 commit 14b5a19

4 files changed

Lines changed: 33 additions & 11 deletions

File tree

.github/workflows/cd.yml

Lines changed: 30 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,13 @@ jobs:
6262
KEYSTORE: ${{ secrets.KEYSTORE }}
6363
KEYSTORE_PROPERTIES: ${{ secrets.KEYSTORE_PROPERTIES }}
6464

65+
- name: 🔐 Set up Local Properties
66+
run: |
67+
touch local.properties
68+
echo "GOOGLE_WEB_CLIENT_ID=$GOOGLE_WEB_CLIENT_ID" >> local.properties
69+
env:
70+
GOOGLE_WEB_CLIENT_ID: ${{ secrets.GOOGLE_WEB_CLIENT_ID }}
71+
6572
- name: 🧹 Clean Project
6673
run: ./gradlew clean
6774

@@ -75,8 +82,8 @@ jobs:
7582
path: app/build/outputs/apk/release/*.apk
7683
retention-days: 30
7784

78-
release:
79-
name: 🚀 Publish Release
85+
github-release:
86+
name: 📋 Create GitHub Release
8087
needs: build # Runs only if the APK build is successful ✅
8188
runs-on: ubuntu-latest
8289
permissions:
@@ -91,6 +98,21 @@ jobs:
9198
name: release-apk
9299
path: ./apk
93100

101+
- name: 📝 Create GitHub Release
102+
uses: softprops/action-gh-release@v2
103+
if: startsWith(github.ref, 'refs/tags/')
104+
with:
105+
body_path: CHANGELOG.md
106+
files: ./apk/*.apk
107+
108+
play-store-release:
109+
name: ☁️ Deploy to Play Store
110+
needs: build # Runs only if the APK build is successful ✅
111+
runs-on: ubuntu-latest
112+
steps:
113+
- name: ⬇️ Checkout Repository
114+
uses: actions/checkout@v5
115+
94116
- name: 🏗️ Set up JDK 21
95117
uses: actions/setup-java@v5
96118
with:
@@ -121,12 +143,12 @@ jobs:
121143
KEYSTORE: ${{ secrets.KEYSTORE }}
122144
KEYSTORE_PROPERTIES: ${{ secrets.KEYSTORE_PROPERTIES }}
123145

124-
- name: 📝 Create GitHub Release
125-
uses: softprops/action-gh-release@v2
126-
if: startsWith(github.ref, 'refs/tags/')
127-
with:
128-
body_path: CHANGELOG.md
129-
files: ./apk/*.apk
146+
- name: 🔐 Set up Local Properties
147+
run: |
148+
touch local.properties
149+
echo "GOOGLE_WEB_CLIENT_ID=$GOOGLE_WEB_CLIENT_ID" >> local.properties
150+
env:
151+
GOOGLE_WEB_CLIENT_ID: ${{ secrets.GOOGLE_WEB_CLIENT_ID }}
130152

131153
- name: ☁️ Upload to Play Store
132154
run: |

CHANGELOG.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
### FEATURE UPDATES & BUG FIXES
22
- Migrate to sdk level 36
33
- Update dependencies
4-
- Fix minor bugs and improve performance
4+
- Fix minor bugs and improve performance
5+
- Fix issue with Google Sign-In

app/build.gradle.kts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ android {
3535
// ... Application Version ...
3636
val majorUpdateVersion = 1
3737
val minorUpdateVersion = 2
38-
val patchVersion = 1
38+
val patchVersion = 2
3939

4040
val mVersionCode = majorUpdateVersion.times(10_000)
4141
.plus(minorUpdateVersion.times(100))

secrets.defaults.properties

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1 @@
1-
BACKEND_URL="https://jsonplaceholder.typicode.com"
21
GOOGLE_WEB_CLIENT_ID="xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx.apps.googleusercontent.com"

0 commit comments

Comments
 (0)