Skip to content

Commit

Permalink
feat: SDK-1407 support self-serve sdk release
Browse files Browse the repository at this point in the history
  • Loading branch information
mohnoor94 committed Aug 13, 2024
1 parent 159feb6 commit 67abd74
Showing 1 changed file with 42 additions and 0 deletions.
42 changes: 42 additions & 0 deletions .github/workflows/selfserve-release.yaml
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"

0 comments on commit 67abd74

Please sign in to comment.