mirror of
https://github.com/revanced/revanced-integrations.git
synced 2025-01-23 02:07:33 +01:00
build: Sign release artifacts
This commit is contained in:
parent
4d0db8c4fb
commit
0dc61d9da4
7
.github/workflows/release.yml
vendored
7
.github/workflows/release.yml
vendored
@ -40,6 +40,13 @@ jobs:
|
||||
- name: Install dependencies
|
||||
run: npm install
|
||||
|
||||
- name: Import GPG key
|
||||
uses: crazy-max/ghaction-import-gpg@v6
|
||||
with:
|
||||
gpg_private_key: ${{ secrets.GPG_PRIVATE_KEY }}
|
||||
passphrase: ${{ secrets.GPG_PASSPHRASE }}
|
||||
fingerprint: ${{ env.GPG_FINGERPRINT }}
|
||||
|
||||
- name: Release
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.REPOSITORY_PUSH_ACCESS }}
|
||||
|
@ -25,7 +25,7 @@
|
||||
{
|
||||
"assets": [
|
||||
{
|
||||
"path": "app/build/outputs/apk/release/*.apk"
|
||||
"path": "app/build/outputs/apk/release/revanced-integrations*"
|
||||
}
|
||||
],
|
||||
successComment: false
|
||||
|
@ -1,6 +1,7 @@
|
||||
plugins {
|
||||
alias(libs.plugins.android.application)
|
||||
alias(libs.plugins.kotlin)
|
||||
publishing
|
||||
}
|
||||
|
||||
android {
|
||||
@ -20,7 +21,7 @@ android {
|
||||
minSdk = 23
|
||||
targetSdk = 33
|
||||
multiDexEnabled = false
|
||||
versionName = project.version as String
|
||||
versionName = version as String
|
||||
}
|
||||
|
||||
buildTypes {
|
||||
@ -53,12 +54,27 @@ dependencies {
|
||||
}
|
||||
|
||||
tasks {
|
||||
// Needed by gradle-semantic-release-plugin.
|
||||
// Tracking: https://github.com/KengoTODA/gradle-semantic-release-plugin/issues/435
|
||||
register("publish") {
|
||||
group = "publishing"
|
||||
description = "Publishes all publications produced by this project."
|
||||
// Because the signing plugin doesn't support signing APKs, do it manually.
|
||||
register("sign") {
|
||||
group = "signing"
|
||||
|
||||
dependsOn(build)
|
||||
|
||||
doLast {
|
||||
val outputDirectory = layout.buildDirectory.dir("outputs/apk/release").get().asFile
|
||||
val integrationsApk = outputDirectory.resolve("${rootProject.name}-$version.apk")
|
||||
|
||||
org.gradle.security.internal.gnupg.GnupgSignatoryFactory().createSignatory(project).sign(
|
||||
integrationsApk.inputStream(),
|
||||
outputDirectory.resolve("${integrationsApk.name}.asc").outputStream(),
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
// Needed by gradle-semantic-release-plugin.
|
||||
// Tracking: https://github.com/KengoTODA/gradle-semantic-release-plugin/issues/435
|
||||
publish {
|
||||
dependsOn(build)
|
||||
dependsOn("sign")
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user