@@ -19,20 +19,16 @@ jobs:
1919 # Job to build APKs for the latest commit and the commit that triggered the workflow
2020 name : Build APKs
2121 runs-on : ubuntu-latest
22- strategy :
23- matrix :
24- # Run matrix for latest commit on branch and current commit SHA
25- commit : ["latest", "${{ github.sha }}"]
26-
22+
2723 env :
2824 BUILD_TOOLS_VERSION : " 34.0.0"
2925
3026 steps :
31- # Checkout the specific commit from matrix
27+ # Checkout the specific commit
3228 - name : Checkout specific commit
3329 uses : actions/checkout@v5
3430 with :
35- ref : ${{ matrix.commit }}
31+ ref : ${{ github.sha }}
3632
3733 # Set up Java JDK required for Gradle
3834 - name : Set up JDK
@@ -62,19 +58,19 @@ jobs:
6258
6359 # Copy the built APK to a commit-specific name
6460 - name : Get apk
65- run : cp owncloudApp/build/outputs/apk/qa/release/owncloud_*-qa-release*.apk owncloud-${{ matrix.commit }}.apk
61+ run : cp owncloudApp/build/outputs/apk/qa/release/owncloud_*-qa-release*.apk owncloud-${{ github.sha }}.apk
6662
6763 # Decode keystore from secret for signing
6864 - name : Restore keystore
6965 run : |
70- echo "${{ secrets.TEST_KS_B64 }}" | base64 -d > ./test.keystore
66+ echo "${{ secrets.TEST_KS_B64 }}" | base64 --decode > ./test.keystore"
7167
7268 # Align and sign the APK
7369 - name : Sign APK
7470 run : |
75- APK_INPUT="owncloud-${{ matrix.commit }}.apk"
76- APK_ALIGNED="owncloud-${{ matrix.commit }}-aligned.apk"
77- APK_SIGNED="owncloudSigned-${{ matrix.commit }}.apk"
71+ APK_INPUT="owncloud-${{ github.sha }}.apk"
72+ APK_ALIGNED="owncloud-${{ github.sha }}-aligned.apk"
73+ APK_SIGNED="owncloudSigned-${{ github.sha }}.apk"
7874 KEYSTORE="./test.keystore"
7975 KEY_ALIAS="${{ secrets.TEST_KS_ALIAS }}"
8076 KEY_PASSWORD="${{ secrets.TEST_KS_KEY }}"
8783 echo "Signing APK..."
8884 $ANDROID_SDK_ROOT/build-tools/${{ env.BUILD_TOOLS_VERSION }}/apksigner sign \
8985 --ks "$KEYSTORE" \
86+ --ks-type PKCS12 \
9087 --ks-pass pass:"$KEY_PASSWORD" \
9188 --key-pass pass:"$KEY_PASSWORD" \
9289 --ks-key-alias "$KEY_ALIAS" \
@@ -103,10 +100,9 @@ jobs:
103100 - name : Upload APK as artifact
104101 uses : actions/upload-artifact@v4
105102 with :
106- name : owncloudSigned-${{ matrix.commit }}
107- path : ./owncloudSigned-${{ matrix.commit }}.apk
108- # Removed after 1 day
109- retention-days : 1
103+ name : owncloudSigned-${{ github.sha }}
104+ path : ./owncloudSigned-${{ github.sha }}.apk
105+ retention-days : 90
110106
111107 execute_tests :
112108 # Job to run tests using the APKs built in previous job
@@ -127,10 +123,11 @@ jobs:
127123 - name : Clone tests repo
128124 run : git clone https://github.com/owncloud/android-update-testing.git .
129125
130- # Download APK built from latest commit
131- - name : Get apk built from latest
132- uses : actions/ download-artifact@v4
126+ # Download APK built last latest signing
127+ - name : Download latest signed APK
128+ uses : dawidd6/action- download-artifact@v3
133129 with :
130+ workflow : Build apk from latest
134131 name : owncloudSigned-latest
135132 path : ./src/test/resources
136133
@@ -221,7 +218,7 @@ jobs:
221218 if : always()
222219 run : zip -r -9 test-recording.zip video || true
223220
224- # Upload video file
221+ # Upload video file
225222 - name : Upload Video
226223 if : always()
227224 uses : actions/upload-artifact@v4
0 commit comments