name: publish java sdk on: workflow_dispatch: # Allows manual trigger of the workflow inputs: custom_version: # Optional input for a custom version description: 'Custom version to publish (e.g., v1.2.3) -- only edit if you know what you are doing' required: false type: string token: description: 'Personal Access Token' required: true default: "" type: string workflow_call: # Allows trigger of the workflow from another workflow inputs: custom_version: # Optional input for a custom version description: 'Custom version to publish (e.g., v1.2.3) -- only edit if you know what you are doing' required: false type: string token: description: 'Personal Access Token' required: true default: "" type: string jobs: publish-java-sdk: if: github.repository == 'feast-dev/feast' container: maven:3.6-jdk-11 runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 with: submodules: 'true' - id: get-version uses: ./.github/actions/get-semantic-release-version with: custom_version: ${{ github.event.inputs.custom_version }} token: ${{ github.event.inputs.token }} - name: Set up JDK 11 uses: actions/setup-java@v1 with: java-version: '11' java-package: jdk architecture: x64 - uses: actions/setup-python@v5 with: python-version: '3.11' architecture: 'x64' - uses: actions/cache@v2 with: path: ~/.m2/repository key: ${{ runner.os }}-it-maven-${{ hashFiles('**/pom.xml') }} restore-keys: | ${{ runner.os }}-it-maven- - name: Publish java sdk env: VERSION_WITHOUT_PREFIX: ${{ steps.get-version.outputs.version_without_prefix }} GPG_PUBLIC_KEY: ${{ secrets.GPG_PUBLIC_KEY }} GPG_PRIVATE_KEY: ${{ secrets.GPG_PRIVATE_KEY }} MAVEN_SETTINGS: ${{ secrets.MAVEN_SETTINGS }} run: | echo -n "$GPG_PUBLIC_KEY" > /root/public-key echo -n "$GPG_PRIVATE_KEY" > /root/private-key mkdir -p /root/.m2/ echo -n "$MAVEN_SETTINGS" > /root/.m2/settings.xml infra/scripts/publish-java-sdk.sh --revision ${VERSION_WITHOUT_PREFIX} --gpg-key-import-dir /root