|
31 | 31 | markdown-lint-check: |
32 | 32 | uses: ./.github/workflows/reusable-markdown-lint-check.yml |
33 | 33 |
|
| 34 | + publish-snapshots: |
| 35 | + needs: |
| 36 | + - common |
| 37 | + runs-on: ubuntu-latest |
| 38 | + steps: |
| 39 | + - uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0 |
| 40 | + |
| 41 | + - name: Free disk space |
| 42 | + run: .github/scripts/gha-free-disk-space.sh |
| 43 | + |
| 44 | + - name: Set up JDK for running Gradle |
| 45 | + uses: actions/setup-java@dded0888837ed1f317902acf8a20df0ad188d165 # v5.0.0 |
| 46 | + with: |
| 47 | + distribution: temurin |
| 48 | + java-version-file: .java-version |
| 49 | + |
| 50 | + - name: Setup Gradle |
| 51 | + uses: gradle/actions/setup-gradle@4d9f0ba0025fe599b4ebab900eb7f3a1d93ef4c2 # v5.0.0 |
| 52 | + |
| 53 | + - name: Build and publish artifact snapshots |
| 54 | + env: |
| 55 | + DEVELOCITY_ACCESS_KEY: ${{ secrets.DEVELOCITY_ACCESS_KEY }} |
| 56 | + SONATYPE_USER: ${{ secrets.SONATYPE_USER }} |
| 57 | + SONATYPE_KEY: ${{ secrets.SONATYPE_KEY }} |
| 58 | + GPG_PRIVATE_KEY: ${{ secrets.GPG_PRIVATE_KEY }} |
| 59 | + GPG_PASSWORD: ${{ secrets.GPG_PASSWORD }} |
| 60 | + run: ./gradlew assemble spdxSbom publishToSonatype |
| 61 | + |
| 62 | + - name: Build and publish gradle plugin snapshots |
| 63 | + env: |
| 64 | + DEVELOCITY_ACCESS_KEY: ${{ secrets.DEVELOCITY_ACCESS_KEY }} |
| 65 | + SONATYPE_USER: ${{ secrets.SONATYPE_USER }} |
| 66 | + SONATYPE_KEY: ${{ secrets.SONATYPE_KEY }} |
| 67 | + GPG_PRIVATE_KEY: ${{ secrets.GPG_PRIVATE_KEY }} |
| 68 | + GPG_PASSWORD: ${{ secrets.GPG_PASSWORD }} |
| 69 | + run: ./gradlew build publishToSonatype |
| 70 | + working-directory: gradle-plugins |
| 71 | + |
34 | 72 | workflow-notification: |
35 | 73 | permissions: |
36 | 74 | contents: read |
|
40 | 78 | - test-latest-deps |
41 | 79 | - muzzle |
42 | 80 | - link-check |
| 81 | + - publish-snapshots |
43 | 82 | if: always() |
44 | 83 | uses: ./.github/workflows/reusable-workflow-notification.yml |
45 | 84 | with: |
|
48 | 87 | needs.common.result == 'success' && |
49 | 88 | needs.test-latest-deps.result == 'success' && |
50 | 89 | needs.muzzle.result == 'success' && |
51 | | - needs.link-check.result == 'success' |
| 90 | + needs.link-check.result == 'success' && |
| 91 | + needs.publish-snapshots.result == 'success' |
52 | 92 | }} |
0 commit comments