Merge pull request #160 from usefulness/renovate/maven.assertj #587
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 project | |
| on: | |
| pull_request: | |
| push: | |
| branches: | |
| - master | |
| - main | |
| - trunk | |
| - develop | |
| - maine | |
| - mane | |
| schedule: | |
| - cron: '0 3 * * 1,4' | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: ${{ github.ref != 'refs/heads/master' }} | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v6 | |
| with: | |
| fetch-depth: 0 | |
| - uses: actions/setup-java@v5 | |
| with: | |
| distribution: 'temurin' | |
| java-version: 24 | |
| - name: Write Gradle build properties to `~/.gradle/gradle.properties` | |
| run: | | |
| mkdir -p ~/.gradle | |
| printf "org.gradle.jvmargs=-Xmx3G -XX:+UseParallelGC\n" >> ~/.gradle/gradle.properties | |
| printf "org.gradle.vfs.watch=false\n" >> ~/.gradle/gradle.properties | |
| printf "org.gradle.parallel=false\n" >> ~/.gradle/gradle.properties | |
| shell: bash | |
| - uses: gradle/actions/setup-gradle@v5 | |
| - uses: gradle/actions/wrapper-validation@v5 | |
| - run: ./gradlew projectCodestyle | |
| - run: ./gradlew assembleRelease check --scan | |
| - run: ./gradlew publishToMavenLocal | |
| - run: git diff --exit-code | |
| - uses: actions/upload-artifact@v6 | |
| if: ${{ always() }} | |
| with: | |
| name: lint-results | |
| path: '${{ github.workspace }}/**/build/**/reports/lint-results-*.html' | |
| - name: Publish | |
| if: github.repository == 'usefulness/rootbeer' && github.event_name == 'push' && github.ref == 'refs/heads/master' | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| ORG_GRADLE_PROJECT_signingInMemoryKeyId: ${{ secrets.SIGNING_KEY_ID }} | |
| ORG_GRADLE_PROJECT_signingInMemoryKeyPassword: ${{ secrets.SIGNING_PASSWORD }} | |
| ORG_GRADLE_PROJECT_signingInMemoryKey: ${{ secrets.GPG_KEY_CONTENTS }} | |
| run: ./gradlew publishAllPublicationsToGithubRepository --no-configuration-cache | |
| - uses: actions/cache@v5 | |
| if: github.event_name != 'pull_request' | |
| name: Upload base (release) | |
| with: | |
| path: diffuse-source-file-release | |
| key: diffuse-${{ github.sha }}-${{ hashFiles('**/aar/**.aar') }} | |
| - run: cp rootbeer-core/build/outputs/aar/rootbeer-core-release.aar diffuse-source-file-release | |
| if: github.event_name != 'pull_request' | |
| shell: bash | |
| build-sample-app: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v6 | |
| with: | |
| fetch-depth: 0 | |
| - uses: actions/setup-java@v5 | |
| with: | |
| distribution: 'temurin' | |
| java-version: 24 | |
| - uses: gradle/actions/setup-gradle@v5 | |
| - run: ./gradlew assemble check | |
| - uses: actions/upload-artifact@v6 | |
| with: | |
| name: apk | |
| path: sample/app/build/outputs/apk/release/*.apk |