|
| 1 | +name: "Main Build" |
| 2 | + |
| 3 | +on: |
| 4 | + push: |
| 5 | + branches: |
| 6 | + - main |
| 7 | + |
| 8 | +jobs: |
| 9 | + build: |
| 10 | + name: build |
| 11 | + runs-on: ubuntu-latest |
| 12 | + steps: |
| 13 | + - uses: actions/checkout@v2 |
| 14 | + with: |
| 15 | + fetch-depth: 0 |
| 16 | + - name: Setup Java 11 |
| 17 | + uses: actions/setup-java@v2 |
| 18 | + with: |
| 19 | + distribution: adopt |
| 20 | + java-version: 11 |
| 21 | + - uses: burrunan/gradle-cache-action@v1 |
| 22 | + name: Build |
| 23 | + with: |
| 24 | + arguments: --stacktrace build |
| 25 | + remote-build-cache-proxy-enabled: false |
| 26 | + - uses: actions/upload-artifact@v2 |
| 27 | + name: Save unit test results |
| 28 | + if: always() |
| 29 | + with: |
| 30 | + name: test-results |
| 31 | + path: jmx-metrics/build/reports/tests/test |
| 32 | + integration-test: |
| 33 | + name: integration-test |
| 34 | + runs-on: ubuntu-latest |
| 35 | + steps: |
| 36 | + - uses: actions/checkout@v2 |
| 37 | + with: |
| 38 | + fetch-depth: 0 |
| 39 | + - name: Setup Java 11 |
| 40 | + uses: actions/setup-java@v2 |
| 41 | + with: |
| 42 | + distribution: adopt |
| 43 | + java-version: 11 |
| 44 | + - uses: burrunan/gradle-cache-action@v1 |
| 45 | + name: Integration Tests |
| 46 | + with: |
| 47 | + arguments: --stacktrace integrationTest |
| 48 | + remote-build-cache-proxy-enabled: false |
| 49 | + - uses: actions/upload-artifact@v2 |
| 50 | + name: Save integrationTest results |
| 51 | + if: always() |
| 52 | + with: |
| 53 | + name: integration-test-results |
| 54 | + path: jmx-metrics/build/reports/tests/test |
| 55 | + publish-snapshots: |
| 56 | + name: publish-snapshots |
| 57 | + runs-on: ubuntu-latest |
| 58 | + needs: [build, integration-test] |
| 59 | + steps: |
| 60 | + - uses: actions/checkout@v2 |
| 61 | + with: |
| 62 | + fetch-depth: 0 |
| 63 | + - name: Setup Java 11 |
| 64 | + uses: actions/setup-java@v2 |
| 65 | + with: |
| 66 | + distribution: adopt |
| 67 | + java-version: 11 |
| 68 | + - uses: burrunan/gradle-cache-action@v1 |
| 69 | + name: Publish |
| 70 | + with: |
| 71 | + arguments: --stacktrace snapshot |
| 72 | + env: |
| 73 | + SONATYPE_USER: ${{ secrets.SONATYPE_USER }} |
| 74 | + SONATYPE_KEY: ${{ secrets.SONATYPE_KEY }} |
| 75 | + GPG_PRIVATE_KEY: ${{ secrets.GPG_PRIVATE_KEY }} |
| 76 | + GPG_PASSWORD: ${{ secrets.GPG_PASSWORD }} |
0 commit comments