Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 17 additions & 12 deletions .github/workflows/release-serde-api.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,13 @@
name: "Infra: Release: Serde API"

on: workflow_dispatch
on:
workflow_dispatch:
inputs:
version:
required: true
type: string
description: Serde API version to release. Must not be a SNAPSHOT.
default: 1.x.0

permissions:
contents: read
Expand All @@ -26,16 +33,14 @@ jobs:
distribution: 'zulu'
cache: 'gradle'

- id: install-secret-key
name: Install GPG secret key
run: |
cat <(echo -e "${{ secrets.GPG_PRIVATE_KEY }}") | gpg --batch --import

- name: Publish to Maven Central
# TODO fix me next publish, I'm broken :(
env:
GPG_PRIVATE_KEY: ${{ secrets.GPG_PRIVATE_KEY }}
GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }}
NEXUS_USERNAME: ${{ secrets.NEXUS_USERNAME }}
NEXUS_PASSWORD: ${{ secrets.NEXUS_PASSWORD }}
run: |
mvn source:jar javadoc:jar package gpg:sign \
-Dgpg.passphrase=${{ secrets.GPG_PASSPHRASE }} \
-Dserver.username=${{ secrets.NEXUS_USERNAME }} \
-Dserver.password=${{ secrets.NEXUS_PASSWORD }} \
central-publishing:publish -pl serde-api -s settings.xml
./gradlew :serde-api:publish \
:serde-api:closeAndReleaseSonatypeStagingRepository \
-Prelease=true \
-Pversion=${{ inputs.version }}
8 changes: 4 additions & 4 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -52,11 +52,11 @@ if (release) {
nexusPublishing {
repositories {
sonatype {
nexusUrl = uri("https://s01.oss.sonatype.org/service/local/")
snapshotRepositoryUrl = uri("https://s01.oss.sonatype.org/content/repositories/snapshots/")
nexusUrl = uri("https://ossrh-staging-api.central.sonatype.com/service/local/")
snapshotRepositoryUrl = uri("https://ossrh-staging-api.central.sonatype.com/content/repositories/snapshots/")

username = sonatypeUsername
password = sonatypePassword
username = System.getenv("NEXUS_USERNAME")
password = System.getenv("NEXUS_PASSWORD")
}
}
}
Expand Down
10 changes: 7 additions & 3 deletions serde-api/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,10 @@ artifacts {

if (release) {
signing {
useInMemoryPgpKeys(
System.getenv("GPG_PRIVATE_KEY"),
System.getenv("GPG_PASSPHRASE")
)
sign(publishing.publications)
}
}
Expand All @@ -33,10 +37,10 @@ publishing {
if (release) {
repositories {
maven {
url "https://s01.oss.sonatype.org/service/local/staging/deploy/maven2"
url "https://ossrh-staging-api.central.sonatype.com/service/local/staging/deploy/maven2"
credentials {
username sonatypeUsername
password sonatypePassword
username System.getenv("NEXUS_USERNAME")
password System.getenv("NEXUS_PASSWORD")
}
}
}
Expand Down
2 changes: 0 additions & 2 deletions serde-api/gradle.properties

This file was deleted.

Loading