Skip to content

Commit

Permalink
Updated build again, again, again
Browse files Browse the repository at this point in the history
  • Loading branch information
BenjaminHalko committed Jan 23, 2024
1 parent fb3681d commit 9e4f1c2
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 14 deletions.
12 changes: 6 additions & 6 deletions .github/workflows/pr-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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
2 changes: 1 addition & 1 deletion .github/workflows/release-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
18 changes: 11 additions & 7 deletions app/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand All @@ -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"
}
}
}
}

Expand Down

0 comments on commit 9e4f1c2

Please sign in to comment.