Skip to content

Commit 14427bb

Browse files
committed
Polish workflow
1 parent ba5d25c commit 14427bb

File tree

3 files changed

+12
-8
lines changed

3 files changed

+12
-8
lines changed

.github/signing_setup.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,5 +16,5 @@ decode_env_to_file() {
1616
fi
1717
}
1818

19-
decode_env_to_file "SIGNING_KEYSTORE" "../keys.jks"
20-
decode_env_to_file "SIGNING_PROPERTIES" "../keys.properties"
19+
decode_env_to_file "SIGNING_KEYSTORE" "keys.jks"
20+
decode_env_to_file "SIGNING_PROPERTIES" "keystore.properties"

.github/workflows/gh_apk_release.yaml

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,13 @@
1+
name: Create GitHub APK Release
12
on: workflow_dispatch
23

4+
permissions:
5+
contents: write
6+
37
env:
48
GRADLE_OPTS: -Dorg.gradle.jvmargs="-Xmx3072m -XX:MaxMetaspaceSize=1g -Xms512m -XX:+HeapDumpOnOutOfMemoryError"
5-
SIGNING_KEYSTORE_PLAY: ${{ secrets.SIGNING_KEYSTORE }}
6-
SIGNING_PROPERTIES_PLAY: ${{ secrets.SIGNING_PROPERTIES }}
9+
SIGNING_KEYSTORE: ${{ secrets.SIGNING_KEYSTORE }}
10+
SIGNING_PROPERTIES: ${{ secrets.SIGNING_PROPERTIES }}
711

812
jobs:
913
build:
@@ -18,7 +22,7 @@ jobs:
1822
distribution: temurin
1923

2024
- name: Setup Signing
21-
run: .github/signing_setup.sh
25+
run: chmod +x .github/signing_setup.sh && .github/signing_setup.sh
2226

2327
- name: Build release APK
2428
run: ./gradlew assembleRelease
@@ -28,7 +32,7 @@ jobs:
2832
run: echo "VERSION=$(grep -Po '^version=\K.*' gradle.properties)" >> $GITHUB_OUTPUT
2933

3034
- name: Create Github Release
31-
uses: softprops/action-gh-release@v1
35+
uses: softprops/action-gh-release@v2
3236
with:
3337
tag_name: ${{ steps.version.outputs.VERSION }}
3438
files: app/build/outputs/apk/release/${{ steps.version.outputs.VERSION }}.apk

app/build.gradle.kts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,11 +26,12 @@ android {
2626
val keystorePropertiesFile = rootProject.file("keystore.properties")
2727
if (keystorePropertiesFile.exists()) {
2828
val keystoreProperties = Properties().apply { load(FileInputStream(keystorePropertiesFile)) }
29-
3029
storeFile = rootProject.file("keys.jks")
3130
storePassword = keystoreProperties["storePassword"] as String
3231
keyAlias = keystoreProperties["keyAlias"] as String
3332
keyPassword = keystoreProperties["keyPassword"] as String
33+
} else {
34+
println("${keystorePropertiesFile.path} does not exist")
3435
}
3536
}
3637
}
@@ -46,7 +47,6 @@ android {
4647
"proguard-rules.pro"
4748
)
4849
// isDebuggable = true
49-
signingConfig = signingConfigs.getByName("release")
5050
}
5151
}
5252
buildFeatures {

0 commit comments

Comments
 (0)