-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: SDK-1407 support self-serve sdk release
- Loading branch information
Showing
1 changed file
with
42 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
name: Release an SDK to Maven Central | ||
|
||
on: | ||
workflow_call: | ||
inputs: | ||
sdk_key: | ||
description: 'Key to the generated SDK artifact' | ||
default: 'sdk' | ||
type: string | ||
|
||
jobs: | ||
release: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Set up JDK 21 | ||
uses: actions/setup-java@v4 | ||
with: | ||
java-version: '21' | ||
distribution: 'temurin' | ||
server-id: oss-sonatype | ||
server-username: SONATYPE_USERNAME | ||
server-password: SONATYPE_PASSWORD | ||
gpg-private-key: ${{ secrets.GPG_PRIVATE_KEY }} | ||
gpg-passphrase: GPG_PASSPHRASE | ||
settings-path: ${{ github.workspace }} | ||
|
||
- name: Download SDK Artifact | ||
uses: actions/download-artifact@v4 | ||
with: | ||
name: ${{ inputs.sdk_key }} | ||
path: sdk | ||
|
||
- name: Release SDK | ||
working-directory: sdk | ||
env: | ||
SONATYPE_USERNAME: ${{ secrets.SONATYPE_USERNAME }} | ||
SONATYPE_PASSWORD: ${{ secrets.SONATYPE_PASSWORD }} | ||
GPG_PASSPHRASE: ${{ secrets.GPG_PRIVATE_KEY_PASSPHRASE }} | ||
run: | | ||
echo "Starting SDK Release - version=$(mvn help:evaluate -Dexpression=project.version -q -DforceStdout)" | ||
mvn deploy --settings $GITHUB_WORKSPACE/settings.xml -B -U -P release -DskipTests=true | ||
echo "SDK Released" |