release.yml 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. name: Release
  2. on:
  3. push:
  4. tags:
  5. - v2.3.*
  6. - v2.4.*
  7. - v3.0.*
  8. jobs:
  9. build:
  10. name: "Release"
  11. strategy:
  12. matrix:
  13. version: [ 8.0.275.hs-adpt ]
  14. runs-on: ubuntu-latest
  15. steps:
  16. - uses: actions/checkout@v2
  17. - name: Cache local Maven repository
  18. uses: actions/cache@v2
  19. with:
  20. path: ~/.m2/repository
  21. key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
  22. restore-keys: ${{ runner.os }}-maven-
  23. - name: Download ${{ matrix.version }}
  24. uses: sdkman/sdkman-action@master
  25. id: sdkman
  26. with:
  27. candidate: java
  28. version: ${{ matrix.version }}
  29. - name: Set up ${{ matrix.version }}
  30. uses: actions/setup-java@v1
  31. with:
  32. java-version: 8
  33. jdkFile: ${{ steps.sdkman.outputs.file }}
  34. server-id: bintray-awspring
  35. server-username: BINTRAY_USERNAME
  36. server-password: BINTRAY_PASSWORD
  37. - name: Run tests
  38. run: ./mvnw -V verify -Pdocs
  39. - name: Deploy to Bintray
  40. run: ./mvnw -V deploy -DskipTests
  41. env:
  42. BINTRAY_USERNAME: ${{ secrets.BINTRAY_USERNAME }}
  43. BINTRAY_PASSWORD: ${{ secrets.BINTRAY_PASSWORD }}
  44. - name: Upload to S3
  45. env:
  46. AWS_ACCESS_KEY_ID: ${{ secrets.S3_AWS_ACCESS_KEY }}
  47. AWS_SECRET_ACCESS_KEY: ${{ secrets.S3_AWS_SECRET_KEY }}
  48. run: |
  49. aws s3 sync --acl public-read docs/target/generated-docs/ s3://awspring-docs/spring-cloud-aws/docs/
  50. aws cloudfront create-invalidation --distribution-id EA7LER7CI960A --paths "/*"