Skip to content

Release Older Stach Version SDKs #1

Release Older Stach Version SDKs

Release Older Stach Version SDKs #1

name: Release Older Stach Version SDKs
env:
MAVEN_GPG_PRIVATE_KEY: ${{ secrets.MAVEN_GPG_PRIVATE_KEY }}
MAVEN_USERNAME: ${{ secrets.MAVEN_USERNAME }}
MAVEN_PASSWORD: ${{ secrets.MAVEN_PASSWORD }}
MAVEN_GPG_PASSPHRASE: ${{ secrets.MAVEN_GPG_PASSPHRASE }}
JAVA_SDK_LOCATION_v1: "java/v1"
JAVA_SDK_LOCATION_v2: "java/v2"
on:
workflow_dispatch:
inputs:
SDKs:
description: 'Which SDK to release? Options are "java-v1" and "java-v2"'
required: true
default: all
jobs:
java-v1:
runs-on: ubuntu-latest
if: github.event_name == 'workflow_dispatch'
&& github.event.inputs.SDKs == 'java-v1'
steps:
- uses: actions/checkout@v2
- name: Set up Java JDK
uses: actions/setup-java@v1
with:
java-version: 1.8
server-id: ossrh
server-username: MAVEN_USERNAME
server-password: MAVEN_PASSWORD
gpg-private-key: ${{ env.MAVEN_GPG_PRIVATE_KEY }}
gpg-passphrase: MAVEN_GPG_PASSPHRASE
- name: Build
run: |
mvn -B package --file ${{ env.JAVA_SDK_LOCATION_v1 }}/pom.xml
- name: Publish to Apache Maven Central
run: |
cd ${{ env.JAVA_SDK_LOCATION_v1 }}
mvn -Psign-artifacts verify deploy
java-v2:
runs-on: ubuntu-latest
if: github.event_name == 'workflow_dispatch'
&& github.event.inputs.SDKs == 'java-v2'
steps:
- uses: actions/checkout@v2
- name: Set up Java JDK
uses: actions/setup-java@v1
with:
java-version: 1.8
server-id: ossrh
server-username: MAVEN_USERNAME
server-password: MAVEN_PASSWORD
gpg-private-key: ${{ env.MAVEN_GPG_PRIVATE_KEY }}
gpg-passphrase: MAVEN_GPG_PASSPHRASE
- name: Build
run: |
mvn -B package --file ${{ env.JAVA_SDK_LOCATION_v2 }}/pom.xml
- name: Publish to Apache Maven Central
run: |
cd ${{ env.JAVA_SDK_LOCATION_v2 }}
mvn -Psign-artifacts verify deploy