Skip to content

Commit b215747

Browse files
authored
Con 146 (#968)
* Working on android github workflow * Updating version so that multiple builds can be done * Trying to clean up yaml
1 parent 2d40f99 commit b215747

File tree

1 file changed

+17
-6
lines changed

1 file changed

+17
-6
lines changed

.github/workflows/build-android.yml

Lines changed: 17 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,17 @@ jobs:
7676
echo -n "$ANDROID_KEY_PROPERTIES" | base64 --decode -o $KEY_PROPERTIES_FILE
7777
echo -n "$ANDROID_UPLOAD_KEY_JKS" | base64 --decode -o $UPLOAD_KEY_JKS_FILE
7878
79+
- name: Update Version Code in Android build
80+
working-directory: ./android
81+
run: |
82+
# Get curent version from build.gradle
83+
VERSION_CODE=$(grep versionCode ./build.gradle | awk '{print $2}') || error "Failed to read Android versionCode"
84+
# Tack on the date including the hour and min
85+
VERSION_CODE="$VERSION_CODE_$(date '+%Y%m%d%H%M')""
86+
87+
# Update capacitor.config.json version code
88+
sed -i "" "s/versionCode .*/versionCode $VERSION_CODE/" ./build.gradle || error "Failed to update Android versionCode"
89+
7990
- name: npm build-mobile
8091
run: npm run build-mobile
8192

@@ -102,12 +113,12 @@ jobs:
102113
working-directory: ./android
103114
run: ./gradlew bundleRelease
104115

105-
# # Upload Bundle AAB Release
106-
# - name: Upload AAB (App Bundle) Release
107-
# uses: actions/upload-artifact@v3
108-
# with:
109-
# name: ${{ env.date_today }} - ${{ env.playstore_name }} - ${{ env.repository_name }} - App bundle(s) AAB release generated
110-
# path: ${{ env.main_project_module }}/build/outputs/bundle/release/
116+
# Upload Bundle AAB Release
117+
- name: Upload AAB (App Bundle) Release
118+
uses: actions/upload-artifact@v3
119+
with:
120+
name: ${{ env.date_today }} - ${{ env.playstore_name }} - ${{ env.repository_name }} - App bundle(s) AAB release generated
121+
path: ${{ env.main_project_module }}/build/outputs/bundle/release/
111122

112123
# - name: Create Release
113124
# id: create_release

0 commit comments

Comments
 (0)