Build Daily #123
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Build Daily | |
| on: | |
| workflow_dispatch: | |
| schedule: | |
| # Run daily at 7:30 AM UTC | |
| - cron: '30 7 * * *' | |
| permissions: | |
| contents: read | |
| jobs: | |
| common: | |
| uses: ./.github/workflows/build-common.yml | |
| with: | |
| no-build-cache: true | |
| secrets: | |
| DEVELOCITY_ACCESS_KEY: ${{ secrets.DEVELOCITY_ACCESS_KEY }} | |
| link-check: | |
| uses: ./.github/workflows/reusable-link-check.yml | |
| publish-snapshots: | |
| needs: | |
| - common | |
| runs-on: ubuntu-latest | |
| if: github.ref_name == 'main' && github.repository == 'open-telemetry/opentelemetry-java-contrib' | |
| steps: | |
| - uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1 | |
| - name: Set up JDK for running Gradle | |
| uses: actions/setup-java@f2beeb24e141e01a676f977032f5a29d81c9e27e # v5.1.0 | |
| with: | |
| distribution: temurin | |
| java-version: 21 | |
| - name: Set up gradle | |
| uses: gradle/actions/setup-gradle@4d9f0ba0025fe599b4ebab900eb7f3a1d93ef4c2 # v5.0.0 | |
| - name: Build and publish snapshots | |
| # Disable parallel due to Sonatype's HTTP 429 rate limiting | |
| run: ./gradlew assemble publishToSonatype --no-parallel | |
| env: | |
| SONATYPE_USER: ${{ secrets.SONATYPE_USER }} | |
| SONATYPE_KEY: ${{ secrets.SONATYPE_KEY }} | |
| GPG_PRIVATE_KEY: ${{ secrets.GPG_PRIVATE_KEY }} | |
| GPG_PASSWORD: ${{ secrets.GPG_PASSWORD }} | |
| DEVELOCITY_ACCESS_KEY: ${{ secrets.DEVELOCITY_ACCESS_KEY }} | |
| GITHUB_TOKEN: ${{ github.token }} | |
| workflow-notification: | |
| permissions: | |
| contents: read | |
| issues: write | |
| if: always() | |
| needs: | |
| - common | |
| - link-check | |
| - publish-snapshots | |
| uses: ./.github/workflows/reusable-workflow-notification.yml | |
| with: | |
| success: >- | |
| ${{ | |
| needs.common.result == 'success' && | |
| needs.link-check.result == 'success' && | |
| needs.publish-snapshots.result == 'success' | |
| }} |