Skip to content

Commit

Permalink
Add legacy publish action
Browse files Browse the repository at this point in the history
The existing java-api-client "deploy" job should publish the new SDK.  Add a
job to publish the old API.  We will get rid of it after releasing 1.0.
  • Loading branch information
arielshaqed committed Sep 27, 2023
1 parent 230f82d commit e13b87f
Showing 1 changed file with 42 additions and 0 deletions.
42 changes: 42 additions & 0 deletions .github/workflows/java-api-client.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,48 @@ on:
description: Tag/version to publish

jobs:
deploy-legacy: # TODO(1.0): Remove this job after releasing 1.0
runs-on: ubuntu-20.04
environment: Treeverse signing
steps:
- name: Checkout
uses: actions/checkout@v3

# Extract the version to 'version' based on workflow_dispatch or triggered tag in the published event
- name: Extract version
shell: bash
run: |
if [ "${{ github.event.inputs.tag }}" != "" ]; then
echo "tag=$(echo ${{ github.event.inputs.tag }} | sed s/^v//)" >> $GITHUB_OUTPUT
else
echo "tag=$(echo ${GITHUB_REF##*/} | sed s/^v//)" >> $GITHUB_OUTPUT
fi
id: version

- name: Java generate package
run: make client-java-legacy PACKAGE_VERSION=${{ steps.version.outputs.tag }}

- name: Install secret key for signing
run: |
cat <(echo -e '${{ secrets.OSSRH_GPG_SECRET_KEY }}') | gpg --batch --import
gpg --list-secret-keys --keyid-format LONG
- name: Set up Java and Maven Central Repository
uses: actions/setup-java@v2
with:
java-version: '11'
distribution: 'adopt'
server-id: ossrh
server-username: MAVEN_USERNAME
server-password: MAVEN_PASSWORD

- name: Build and publish package
working-directory: clients/java-legacy
run: mvn --batch-mode deploy -Dgpg.executable="${GITHUB_WORKSPACE}/scripts/gpg_loopback.sh" --activate-profiles sign-artifacts
env:
MAVEN_USERNAME: ${{ secrets.OSSRH_USERNAME }}
MAVEN_PASSWORD: ${{ secrets.OSSRH_TOKEN }}

deploy:
runs-on: ubuntu-20.04
environment: Treeverse signing
Expand Down

0 comments on commit e13b87f

Please sign in to comment.