@@ -19,20 +19,16 @@ jobs:
19
19
# Job to build APKs for the latest commit and the commit that triggered the workflow
20
20
name : Build APKs
21
21
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
+
27
23
env :
28
24
BUILD_TOOLS_VERSION : " 34.0.0"
29
25
30
26
steps :
31
- # Checkout the specific commit from matrix
27
+ # Checkout the specific commit
32
28
- name : Checkout specific commit
33
29
uses : actions/checkout@v5
34
30
with :
35
- ref : ${{ matrix.commit }}
31
+ ref : ${{ github.sha }}
36
32
37
33
# Set up Java JDK required for Gradle
38
34
- name : Set up JDK
@@ -62,19 +58,19 @@ jobs:
62
58
63
59
# Copy the built APK to a commit-specific name
64
60
- 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
66
62
67
63
# Decode keystore from secret for signing
68
64
- name : Restore keystore
69
65
run : |
70
- echo "${{ secrets.TEST_KS_B64 }}" | base64 -d > ./test.keystore
66
+ echo "${{ secrets.TEST_KS_B64 }}" | base64 --decode > ./test.keystore
71
67
72
68
# Align and sign the APK
73
69
- name : Sign APK
74
70
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"
78
74
KEYSTORE="./test.keystore"
79
75
KEY_ALIAS="${{ secrets.TEST_KS_ALIAS }}"
80
76
KEY_PASSWORD="${{ secrets.TEST_KS_KEY }}"
87
83
echo "Signing APK..."
88
84
$ANDROID_SDK_ROOT/build-tools/${{ env.BUILD_TOOLS_VERSION }}/apksigner sign \
89
85
--ks "$KEYSTORE" \
86
+ --ks-type PKCS12 \
90
87
--ks-pass pass:"$KEY_PASSWORD" \
91
88
--key-pass pass:"$KEY_PASSWORD" \
92
89
--ks-key-alias "$KEY_ALIAS" \
@@ -103,10 +100,9 @@ jobs:
103
100
- name : Upload APK as artifact
104
101
uses : actions/upload-artifact@v4
105
102
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
110
106
111
107
execute_tests :
112
108
# Job to run tests using the APKs built in previous job
@@ -127,10 +123,11 @@ jobs:
127
123
- name : Clone tests repo
128
124
run : git clone https://github.com/owncloud/android-update-testing.git .
129
125
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
133
129
with :
130
+ workflow : Build apk from latest
134
131
name : owncloudSigned-latest
135
132
path : ./src/test/resources
136
133
@@ -221,7 +218,7 @@ jobs:
221
218
if : always()
222
219
run : zip -r -9 test-recording.zip video || true
223
220
224
- # Upload video file
221
+ # Upload video file
225
222
- name : Upload Video
226
223
if : always()
227
224
uses : actions/upload-artifact@v4
0 commit comments