Skip to content

Commit bea8d01

Browse files
committed
DO NOT MERGE: Test publishing snapshots
Signed-off-by: Aayush Gupta <aayushgupta219@gmail.com>
1 parent 5829562 commit bea8d01

2 files changed

Lines changed: 12 additions & 1 deletion

File tree

.github/workflows/snapshot.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@ on:
44
push:
55
branches:
66
- dev
7+
- snapshot
8+
workflow_dispatch:
79

810
jobs:
911
build-and-deploy-docs:
@@ -25,4 +27,9 @@ jobs:
2527
restore-keys: ${{ runner.os }}-gradle
2628

2729
- name: Publish snapshot
30+
env:
31+
PGP_PRIVATE_SIGNING_KEY: ${{ secrets.PGP_PRIVATE_SIGNING_KEY }}
32+
PGP_PRIVATE_SIGNING_KEY_PASSWORD: ${{ secrets.PGP_PRIVATE_SIGNING_KEY_PASSWORD }}
33+
SONATYPE_MAVEN_CENTRAL_USERNAME: ${{ secrets.SONATYPE_MAVEN_CENTRAL_USERNAME }}
34+
SONATYPE_MAVEN_CENTRAL_PASSWORD: ${{ secrets.SONATYPE_MAVEN_CENTRAL_PASSWORD }}
2835
run: ./gradlew publishSnapshotPublicationToSonatypeRepository

extractor/build.gradle.kts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,10 @@ val ciSigningPassword: String? = System.getenv("PGP_PRIVATE_SIGNING_KEY_PASSWORD
1111
val shouldSignCIRelease: Boolean
1212
get() = !ciSigningKey.isNullOrEmpty() && !ciSigningPassword.isNullOrEmpty()
1313

14+
val lastCommitHash: String = providers.exec {
15+
commandLine("git", "rev-parse", "--short", "HEAD")
16+
}.standardOutput.asText.map { it.trim() }.get()
17+
1418
plugins {
1519
alias(libs.plugins.google.protobuf)
1620
checkstyle
@@ -172,7 +176,7 @@ publishing {
172176
repositories {
173177
maven {
174178
name = "sonatype"
175-
url = uri("https://s01.oss.sonatype.org/content/repositories/snapshots/")
179+
url = uri("https://central.sonatype.com/repository/maven-snapshots/")
176180
credentials {
177181
username = System.getenv("SONATYPE_MAVEN_CENTRAL_USERNAME")
178182
password = System.getenv("SONATYPE_MAVEN_CENTRAL_PASSWORD")

0 commit comments

Comments
 (0)