Skip to content

Commit

Permalink
Fixes
Browse files Browse the repository at this point in the history
lamba92 committed Jul 5, 2024
1 parent 489b6e6 commit f5c39a5
Showing 5 changed files with 31 additions and 7 deletions.
5 changes: 4 additions & 1 deletion .github/workflows/check.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,13 @@
on: [ pull_request, push ]

name: Test and lint

jobs:
build:
env:
# to build RocksDB macos is required, but tests do not pass anyway
DISABLE_ROCKSDB: true
runs-on: macos-latest
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: gradle/gradle-build-action@v3
5 changes: 4 additions & 1 deletion .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -4,11 +4,14 @@ on:
release:
types: [ published ]

name: Publish to Space

jobs:
build:
env:
# to build RocksDB macos is required, but tests do not pass anyway
DISABLE_ROCKSDB: true
runs-on: macos-latest
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: gradle/gradle-build-action@v3
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -3,6 +3,8 @@ build/
!gradle/wrapper/gradle-wrapper.jar
!**/src/main/**/build/
!**/src/test/**/build/
local.properties
secret.txt

### IntelliJ IDEA ###
.idea/
23 changes: 19 additions & 4 deletions buildSrc/src/main/kotlin/convention.gradle.kts
Original file line number Diff line number Diff line change
@@ -75,11 +75,21 @@ fun NamedDomainObjectContainer<KotlinSourceSet>.silenceOptIns() = all {
}
}

signing {
val secretKey: String? = System.getenv("SECRET_KEY")
val password: String? = System.getenv("SECRET_KEY_PASSWORD")
val secretKey: String? = System.getenv("SECRET_KEY")
?: rootProject.file("secret.txt")
.takeIf { it.exists() }
?.readText()

if (secretKey != null && password != null) {
val password: String? = System.getenv("SECRET_KEY_PASSWORD")
?: rootProject.file("local.properties")
.readLines()
.map { it.split("=") }
.find { it.first() == "secret.password" }
?.get(1)


if (secretKey != null && password != null) {
signing {
useInMemoryPgpKeys(secretKey, password)
publishing.publications.all {
sign(this)
@@ -116,5 +126,10 @@ tasks {
check {
dependsOn(ktlintCheck)
}

// workaround https://github.com/gradle/gradle/issues/26091
withType<PublishToMavenRepository> {
dependsOn(withType<Sign>())
}
}

3 changes: 2 additions & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
org.gradle.jvmargs=-Xmx4g
kotlin.apple.xcodeCompatibility.nowarn=true
kotlin.apple.xcodeCompatibility.nowarn=true
org.gradle.parallel=true

0 comments on commit f5c39a5

Please sign in to comment.