Update build.gradle #135
Workflow file for this run
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: Automated Builds | |
| on: | |
| workflow_dispatch: | |
| push: | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: read | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Setup Gradle | |
| uses: gradle/actions/setup-gradle@v5 | |
| with: | |
| cache-encryption-key: ${{ secrets.GRADLE_ENCRYPTION_KEY }} | |
| - name: Set up JDK 17 | |
| uses: actions/setup-java@v4 | |
| with: | |
| java-version: '17' | |
| distribution: 'temurin' | |
| cache: 'gradle' | |
| - name: Restore DataGen cache | |
| id: cache-restore | |
| uses: actions/cache/restore@v4 | |
| with: | |
| path: src/main/generated | |
| key: datagen-${{ github.run_id }} | |
| restore-keys: | |
| datagen- | |
| - name: Run DataGen | |
| run: ./gradlew --configuration-cache runDatagen | |
| - name: Build | |
| run: ./gradlew --configuration-cache build | |
| - name: Build for Maven | |
| env: | |
| CI_MAVEN_PATH: ${{ runner.temp }}/maven | |
| run: ./gradlew --configuration-cache publishMavenJavaPublicationToCiRepository | |
| - name: Save DataGen cache | |
| id: cache-save | |
| uses: actions/cache/save@v4 | |
| with: | |
| path: src/main/generated | |
| key: ${{ steps.cache-restore.outputs.cache-primary-key }} | |
| - name: Publish to Amble Maven | |
| uses: drtheodor/static-file-server-actions/upload@main | |
| with: | |
| repo: amblelabs/maven | |
| path: ${{ runner.temp }}/maven | |
| token: ${{ secrets.BOT_TOKEN }} | |
| - name: Publish artifacts | |
| uses: drtheodor/discord-webhook-upload-action@v0.2 | |
| with: | |
| url: ${{ secrets.DEV_BUILDS }} | |
| file: 'build/libs/*' | |
| username: librarian | |
| avatar: 'https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcRD8DyTHxubVIbpkJDGuYBUvMzLXpA-yH6k2w&s' | |
| message_commit: '> :sparkles: [${commitMessage}](<${commitUrl}>) by [${authorName}](<${authorUrl}>)' | |
| message_header: | | |
| <:new1:1253371736510959636><:new2:1253371805734015006> New `${{ github.repository }}` dev build `#${{ github.run_number }}`: |