Skip to content

Commit

Permalink
Update release workflow
Browse files Browse the repository at this point in the history
Add developers section to poms
  • Loading branch information
slinkydeveloper committed Dec 13, 2023
1 parent 5291160 commit 47d3ed0
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 2 deletions.
21 changes: 20 additions & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,14 @@ jobs:
- name: Validate Gradle wrapper
uses: gradle/wrapper-validation-action@v1

# Retrieve the version of the SDK
- name: Install dasel
run: curl -sSLf "$(curl -sSLf https://api.github.com/repos/tomwright/dasel/releases/latest | grep browser_download_url | grep linux_amd64 | grep -v .gz | cut -d\" -f 4)" -L -o dasel && chmod +x dasel && mv ./dasel /usr/local/bin/dasel
- name: Bump version overwriting libs.versions.toml
run: |
echo "PUBLISHED_SDK_VERSION=$(dasel -f gradle/libs.versions.toml '.versions.restate')" >> "$GITHUB_ENV"
# Dry run
- name: Publish dry-run
uses: gradle/gradle-build-action@v2
env:
Expand All @@ -28,7 +36,7 @@ jobs:
with:
arguments: publishToMavenLocal

- name: Publish to Maven Central
- name: Publish to staging area on Maven Central
uses: gradle/gradle-build-action@v2
env:
MAVEN_CENTRAL_USERNAME: ${{ secrets.MAVEN_CENTRAL_USERNAME }}
Expand All @@ -37,3 +45,14 @@ jobs:
MAVEN_CENTRAL_GPG_PASSPHRASE: ${{ secrets.MAVEN_CENTRAL_GPG_PASSPHRASE }}
with:
arguments: publish

- name: Release staging area
if: !contains(env.PUBLISHED_SDK_VERSION, '-SNAPSHOT')
uses: gradle/gradle-build-action@v2
env:
MAVEN_CENTRAL_USERNAME: ${{ secrets.MAVEN_CENTRAL_USERNAME }}
MAVEN_CENTRAL_TOKEN: ${{ secrets.MAVEN_CENTRAL_TOKEN }}
MAVEN_CENTRAL_GPG_PRIVATE_KEY: ${{ secrets.MAVEN_CENTRAL_GPG_PRIVATE_KEY }}
MAVEN_CENTRAL_GPG_PASSPHRASE: ${{ secrets.MAVEN_CENTRAL_GPG_PASSPHRASE }}
with:
arguments: findSonatypeStagingRepository closeAndReleaseSonatypeStagingRepository
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,14 @@ project.afterEvaluate {
developerConnection = "scm:git:ssh://github.com/restatedev/sdk-java.git"
url = "https://github.com/restatedev/sdk-java"
}

developers {
developer {
name = "Francesco Guardiani"
id = "slinkydeveloper"
email = "[email protected]"
}
}
}
}
}
Expand All @@ -43,6 +51,6 @@ project.afterEvaluate {
val publishing: PublishingExtension by project

useInMemoryPgpKeys(key, password)
sign(publishing.publications)
sign(publishing.publications["maven"])
}
}

0 comments on commit 47d3ed0

Please sign in to comment.