-
Notifications
You must be signed in to change notification settings - Fork 3
46 lines (42 loc) · 1.47 KB
/
selfserve-release-sdk.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
name: Release an SDK to Maven Central
on:
workflow_call:
inputs:
branch:
description: "Branch to release the SDK from. Defaults to 'main'"
type: string
default: 'main'
sdk_path:
description: "Path to the SDK sources. Defaults to 'code'"
type: string
default: 'code'
jobs:
release-sdk:
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: Checkout SDK branch
uses: actions/checkout@v4
with:
ref: ${{ inputs.branch }}
path: product-repo
- name: Release SDK
working-directory: product-repo/${{ inputs.sdk_path }}
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"