File tree Expand file tree Collapse file tree 3 files changed +62
-47
lines changed Expand file tree Collapse file tree 3 files changed +62
-47
lines changed Load Diff This file was deleted.
Original file line number Diff line number Diff line change
1
+ name : build
2
+ on :
3
+ release :
4
+ types : [created]
5
+ push :
6
+ branches :
7
+ - " **"
8
+
9
+ jobs :
10
+ build :
11
+ runs-on : ubuntu-latest
12
+ if : github.event_name != 'release'
13
+ permissions :
14
+ contents : read
15
+ steps :
16
+ - uses : actions/checkout@v4
17
+ with :
18
+ submodules : true
19
+ - run : echo "JAVA_HOME=$JAVA_HOME_17_X64" >> $GITHUB_ENV
20
+ - run : ./gradlew --no-daemon :app:assembleDebug
21
+ - uses : actions/upload-artifact@v4
22
+ with :
23
+ name : build
24
+ path : ./app/build/outputs/apk/debug/*.apk
25
+ retention-days : 3
26
+ release :
27
+ if : github.event_name == 'release'
28
+ runs-on : ubuntu-latest
29
+ permissions :
30
+ contents : read
31
+ steps :
32
+ - uses : actions/checkout@v4
33
+ with :
34
+ submodules : true
35
+ - run : echo "JAVA_HOME=$JAVA_HOME_17_X64" >> $GITHUB_ENV
36
+ - run : echo "SIGNING_STORE_FILE=$RUNNER_TEMP/keystore.jks" >> $GITHUB_ENV
37
+ - run : printenv SIGNING_STORE_FILE_BASE64 | base64 -d > "$SIGNING_STORE_FILE"
38
+ env :
39
+ SIGNING_STORE_FILE_BASE64 : ${{ secrets.ANDROID_SIGNING_STORE_FILE_BASE64 }}
40
+ - run : ./gradlew --no-daemon :app:assembleRelease :app:bundleRelease
41
+ env :
42
+ SIGNING_KEY_PASSWORD : ${{ secrets.ANDROID_SIGNING_PASSWORD }}
43
+ SIGNING_STORE_PASSWORD : ${{ secrets.ANDROID_SIGNING_PASSWORD }}
44
+ SIGNING_KEY_ALIAS : upload
45
+ - run : rm "$SIGNING_STORE_FILE"
46
+ -
uses :
microbit-foundation/[email protected]
47
+ with :
48
+ file : app/build/outputs/apk/bundle/app-bundle.aab
49
+ asset_name : microbit-bundle-${{ env.TAG }}.aab
50
+ -
uses :
microbit-foundation/[email protected]
51
+ with :
52
+ file : app/build/outputs/apk/release/app-release.apk
53
+ asset_name : microbit-release-${{ env.TAG }}.apk
Original file line number Diff line number Diff line change @@ -9,10 +9,19 @@ android {
9
9
// When target SDK version is 30+,
10
10
// requestLegacyExternalStorage will continue to work for 29 Android 10
11
11
}
12
+ signingConfigs {
13
+ release {
14
+ keyAlias= System . getenv(' SIGNING_KEY_ALIAS' )
15
+ keyPassword= System . getenv(' SIGNING_KEY_PASSWORD' )
16
+ storeFile= System . getenv(' SIGNING_STORE_FILE' ) ? file(System . getenv(' SIGNING_STORE_FILE' )) : null
17
+ storePassword= System . getenv(' SIGNING_STORE_PASSWORD' )
18
+ }
19
+ }
12
20
buildTypes {
13
21
release {
14
22
minifyEnabled false
15
23
proguardFiles getDefaultProguardFile(' proguard-android.txt' ), ' proguard-rules.pro'
24
+ signingConfig signingConfigs. release
16
25
}
17
26
}
18
27
productFlavors {
You can’t perform that action at this time.
0 commit comments