gradle-plugins.yml 1.0 KB

123456789101112131415161718192021222324252627282930313233343536373839
  1. name: Publish Gradle plugin snapshots
  2. on:
  3. push:
  4. paths:
  5. - 'gradle-plugins/**'
  6. - '.github/workflows/gradle-plugins.yml'
  7. branches:
  8. - main
  9. workflow_dispatch:
  10. jobs:
  11. snapshot:
  12. runs-on: ubuntu-latest
  13. steps:
  14. - uses: actions/checkout@v2.3.4
  15. with:
  16. fetch-depth: 0
  17. - name: Set up JDK 11 for running checks
  18. uses: actions/setup-java@v2
  19. with:
  20. distribution: adopt
  21. java-version: 11
  22. - name: Cache Gradle Wrapper
  23. uses: actions/cache@v2
  24. with:
  25. path: ~/.gradle/wrapper
  26. key: ${{ runner.os }}-gradle-wrapper-cache-${{ hashFiles('gradle/wrapper/gradle-wrapper.properties') }}
  27. - name: Publish snapshot
  28. env:
  29. SONATYPE_USER: ${{ secrets.SONATYPE_USER }}
  30. SONATYPE_KEY: ${{ secrets.SONATYPE_KEY }}
  31. GPG_PRIVATE_KEY: ${{ secrets.GPG_PRIVATE_KEY }}
  32. GPG_PASSWORD: ${{ secrets.GPG_PASSWORD }}
  33. run: ../gradlew build publishToSonatype
  34. working-directory: gradle-plugins