Updated build again, again, again

This commit is contained in:
Benjamin Halko 2024-01-23 12:45:28 -08:00
parent fb3681d8c9
commit 9e4f1c2d3b
No known key found for this signature in database
GPG key ID: 790C70040EB331A0
3 changed files with 18 additions and 14 deletions

View file

@ -17,6 +17,10 @@ jobs:
- name: Checkout
uses: actions/checkout@v4
- name: Get commit hash
id: get_commit_hash
run: echo "hash=$(git rev-parse --short HEAD)" >> $GITHUB_OUTPUT
- name: Set up JDK 17
uses: actions/setup-java@v4
with:
@ -27,14 +31,10 @@ jobs:
uses: gradle/gradle-build-action@v2
- name: Build with Gradle
run: ./gradlew assembleRelease --no-daemon -PnoProguard
- name: Get commit hash
id: get_commit_hash
run: echo "hash=$(git rev-parse --short HEAD)" >> $GITHUB_OUTPUT
run: ./gradlew assembleRelease --no-daemon -PnoProguard -Psuffix=${{ steps.get_commit_hash.outputs.hash }}
- name: Upload build
uses: actions/upload-artifact@v3
with:
name: revanced-manager-${{ steps.get_commit_hash.outputs.hash }}.apk
name: revanced-manager-${{ steps.get_commit_hash.outputs.hash }}
path: app/build/outputs/apk/release/*.apk

View file

@ -48,5 +48,5 @@ jobs:
keyAlias: ${{ secrets.SIGNING_KEY_ALIAS }}
keyPassword: ${{ secrets.SIGNING_KEY_PASSWORD }}
run: |
echo "${{ secrets.SIGNING_KEYSTORE }}" | base64 --decode > keystore.jks
echo "${{ secrets.SIGNING_KEYSTORE }}" | base64 --decode > app/keystore.jks
npx semantic-release

View file

@ -42,13 +42,6 @@ android {
}
}
signingConfig = signingConfigs.getByName("release")
applicationVariants.all {
this.outputs
.map { it as com.android.build.gradle.internal.api.BaseVariantOutputImpl }
.forEach { output ->
output.outputFileName = "revanced-manager-v${project.version}.apk"
}
}
} else {
applicationIdSuffix = ".debug"
resValue("string", "app_name", "ReVanced Manager Debug")
@ -59,6 +52,17 @@ android {
isShrinkResources = true
proguardFiles(getDefaultProguardFile("proguard-android-optimize.txt"), "proguard-rules.pro")
}
var suffix = "v${project.version}"
if (project.hasProperty("suffix")) {
suffix = "${project.property("suffix")}"
}
applicationVariants.all {
this.outputs
.map { it as com.android.build.gradle.internal.api.BaseVariantOutputImpl }
.forEach { output ->
output.outputFileName = "revanced-manager-${suffix}.apk"
}
}
}
}