Compare commits
3 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| d262331d1b | |||
| 7440e85987 | |||
| 2351512af8 |
8
.github/workflows/build.yml
vendored
8
.github/workflows/build.yml
vendored
@@ -24,7 +24,9 @@ jobs:
|
|||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v6
|
- uses: actions/checkout@v6
|
||||||
|
with:
|
||||||
|
fetch-depth: 0
|
||||||
|
|
||||||
- name: set up secrets
|
- name: set up secrets
|
||||||
run: |
|
run: |
|
||||||
echo "${{ secrets.RELEASE_KEYSTORE }}" > keystore.asc
|
echo "${{ secrets.RELEASE_KEYSTORE }}" > keystore.asc
|
||||||
@@ -49,7 +51,9 @@ jobs:
|
|||||||
uses: gradle/actions/setup-gradle@v6
|
uses: gradle/actions/setup-gradle@v6
|
||||||
|
|
||||||
- name: Build APK
|
- name: Build APK
|
||||||
run: ./gradlew assembleSignedRelease
|
run: |
|
||||||
|
VERSION_CODE=$(git rev-list --count HEAD)
|
||||||
|
./gradlew assembleSignedRelease -PVERSION_CODE=$VERSION_CODE
|
||||||
|
|
||||||
- name: Release
|
- name: Release
|
||||||
uses: softprops/action-gh-release@v3
|
uses: softprops/action-gh-release@v3
|
||||||
|
|||||||
@@ -1,16 +1,3 @@
|
|||||||
def getCommitCount() {
|
|
||||||
try {
|
|
||||||
def stdout = new ByteArrayOutputStream()
|
|
||||||
exec {
|
|
||||||
commandLine 'git', 'rev-list', '--count', 'HEAD'
|
|
||||||
standardOutput = stdout
|
|
||||||
}
|
|
||||||
return stdout.toString().trim().toInteger()
|
|
||||||
} catch (ignored) {
|
|
||||||
return 1
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
plugins {
|
plugins {
|
||||||
id 'com.android.application'
|
id 'com.android.application'
|
||||||
id 'org.jetbrains.kotlin.plugin.serialization' version '2.3.21'
|
id 'org.jetbrains.kotlin.plugin.serialization' version '2.3.21'
|
||||||
@@ -28,8 +15,8 @@ android {
|
|||||||
applicationId 'net.helcel.beans'
|
applicationId 'net.helcel.beans'
|
||||||
minSdk = 28
|
minSdk = 28
|
||||||
targetSdk = 37
|
targetSdk = 37
|
||||||
versionName "1.2"
|
versionName "1.2b"
|
||||||
versionCode getCommitCount()
|
versionCode project.hasProperty('VERSION_CODE') ? project.property('VERSION_CODE').toInteger() : 1
|
||||||
}
|
}
|
||||||
signingConfigs {
|
signingConfigs {
|
||||||
register("release") {
|
register("release") {
|
||||||
|
|||||||
Reference in New Issue
Block a user