mirror of
https://github.com/revanced/revanced-integrations.git
synced 2024-11-07 20:57:02 +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
|
- name: Install dependencies
|
||||||
run: npm install
|
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
|
- name: Release
|
||||||
env:
|
env:
|
||||||
GITHUB_TOKEN: ${{ secrets.REPOSITORY_PUSH_ACCESS }}
|
GITHUB_TOKEN: ${{ secrets.REPOSITORY_PUSH_ACCESS }}
|
||||||
|
@ -25,7 +25,7 @@
|
|||||||
{
|
{
|
||||||
"assets": [
|
"assets": [
|
||||||
{
|
{
|
||||||
"path": "app/build/outputs/apk/release/*.apk"
|
"path": "app/build/outputs/apk/release/revanced-integrations*"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
successComment: false
|
successComment: false
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
plugins {
|
plugins {
|
||||||
alias(libs.plugins.android.application)
|
alias(libs.plugins.android.application)
|
||||||
alias(libs.plugins.kotlin)
|
alias(libs.plugins.kotlin)
|
||||||
|
publishing
|
||||||
}
|
}
|
||||||
|
|
||||||
android {
|
android {
|
||||||
@ -20,7 +21,7 @@ android {
|
|||||||
minSdk = 23
|
minSdk = 23
|
||||||
targetSdk = 33
|
targetSdk = 33
|
||||||
multiDexEnabled = false
|
multiDexEnabled = false
|
||||||
versionName = project.version as String
|
versionName = version as String
|
||||||
}
|
}
|
||||||
|
|
||||||
buildTypes {
|
buildTypes {
|
||||||
@ -53,12 +54,27 @@ dependencies {
|
|||||||
}
|
}
|
||||||
|
|
||||||
tasks {
|
tasks {
|
||||||
// Needed by gradle-semantic-release-plugin.
|
// Because the signing plugin doesn't support signing APKs, do it manually.
|
||||||
// Tracking: https://github.com/KengoTODA/gradle-semantic-release-plugin/issues/435
|
register("sign") {
|
||||||
register("publish") {
|
group = "signing"
|
||||||
group = "publishing"
|
|
||||||
description = "Publishes all publications produced by this project."
|
|
||||||
|
|
||||||
dependsOn(build)
|
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…
Reference in New Issue
Block a user