Skip to content

Commit cb930bc

Browse files
committed
fix(build): Only create signed apks from my own branches
Signed-off-by: Marcel Klehr <mklehr@gmx.net>
1 parent 9bfc05f commit cb930bc

File tree

1 file changed

+13
-1
lines changed

1 file changed

+13
-1
lines changed

.github/workflows/build.yml

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,7 @@ jobs:
7575
path: ./
7676

7777
- name: Create JKS file from secrets
78+
if: github.ref_name == 'develop' || github.ref_name == 'master'
7879
env:
7980
ANDROID_CERT: ${{ secrets.ANDROID_CERT }}
8081
ANDROID_PRIV_KEY: ${{ secrets.ANDROID_PRIV_KEY }}
@@ -104,6 +105,7 @@ jobs:
104105
chmod 600 keystore/app.jks
105106
106107
- name: Create gradle.properties file
108+
if: github.ref_name == 'develop' || github.ref_name == 'master'
107109
run: |
108110
cat >> android/gradle.properties << EOF
109111
FLOCCUS_STORE_FILE=../../keystore/app.jks
@@ -112,14 +114,24 @@ jobs:
112114
FLOCCUS_KEY_PASSWORD=${{ secrets.ANDROID_JKS_PASSWORD }}
113115
EOF
114116
115-
- name: Build android
117+
- name: Prepare build
116118
run: |
117119
npx cap sync
118120
cd android
119121
chmod +x gradlew
122+
123+
- name: Build android release
124+
if: github.ref_name == 'develop' || github.ref_name == 'master'
125+
run: |
120126
./gradlew assembleRelease
121127
128+
- name: Build android
129+
if: github.ref_name != 'develop' && github.ref_name != 'master'
130+
run: |
131+
./gradlew assemble
132+
122133
- name: Upload build artifact
134+
if: github.ref_name == 'develop' || github.ref_name == 'master'
123135
uses: actions/upload-artifact@v4
124136
with:
125137
name: "floccus-build-${{ github.sha }}.apk"

0 commit comments

Comments
 (0)