name: Release on: push: tags: - v2.3.* - v2.4.* - v3.0.* jobs: build: name: "Release" strategy: matrix: version: [ 8.0.275.hs-adpt ] runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 - name: Cache local Maven repository uses: actions/cache@v2 with: path: ~/.m2/repository key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }} restore-keys: ${{ runner.os }}-maven- - name: Download ${{ matrix.version }} uses: sdkman/sdkman-action@master id: sdkman with: candidate: java version: ${{ matrix.version }} - name: Set up ${{ matrix.version }} uses: actions/setup-java@v1 with: java-version: 8 jdkFile: ${{ steps.sdkman.outputs.file }} server-id: bintray-awspring server-username: BINTRAY_USERNAME server-password: BINTRAY_PASSWORD - name: Run tests run: ./mvnw -V verify -Pdocs - name: Deploy to Bintray run: ./mvnw -V deploy -DskipTests env: BINTRAY_USERNAME: ${{ secrets.BINTRAY_USERNAME }} BINTRAY_PASSWORD: ${{ secrets.BINTRAY_PASSWORD }} - name: Upload to S3 env: AWS_ACCESS_KEY_ID: ${{ secrets.S3_AWS_ACCESS_KEY }} AWS_SECRET_ACCESS_KEY: ${{ secrets.S3_AWS_SECRET_KEY }} run: | aws s3 sync --acl public-read docs/target/generated-docs/ s3://awspring-docs/spring-cloud-aws/docs/ aws cloudfront create-invalidation --distribution-id EA7LER7CI960A --paths "/*"