Skip to content

Sonatype release (#149) #82

Sonatype release (#149)

Sonatype release (#149) #82

Workflow file for this run

name: Swim Java SDK
on:
push:
branches:
- main
paths:
- 'swim-java/**'
workflow_dispatch:
defaults:
run:
working-directory: swim-java
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-java@v2
with:
java-version: '11'
distribution: 'adopt'
- uses: gradle/wrapper-validation-action@v1
- name: Compile SDK
run: |
./gradlew compileTestJava
- name: Generate API docs
run: |
./gradlew :javadoc
- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@v1
with:
aws-access-key-id: ${{ secrets.AWS_DOCS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.AWS_DOCS_SECRET_ACCESS_KEY }}
aws-region: us-west-1
- name: Publish latest API docs
run: |
aws s3 sync build/docs/javadoc s3://docs.swimos.org/java/4.x
aws cloudfront create-invalidation --distribution-id ${{ secrets.AWS_DOCS_CLOUDFRONT_DISTRIBUTION_ID }} --paths '/java/4.x/*'