Skip to content
This repository has been archived by the owner on May 25, 2024. It is now read-only.

Update gradle/wrapper-validation-action action to v3 #273

Update gradle/wrapper-validation-action action to v3

Update gradle/wrapper-validation-action action to v3 #273

Workflow file for this run

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@v4
with:
fetch-depth: 0
- uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: 21
- uses: gradle/wrapper-validation-action@v3
- uses: gradle/gradle-build-action@v3
- run: ./gradlew currentVersion
- run: ./gradlew projectCodestyle
- run: ./gradlew assemble check --scan
- run: ./gradlew projectCoverage
- uses: codecov/codecov-action@v4
with:
token: ${{ secrets.CODECOV_TOKEN }}
- run: ./gradlew publishToMavenLocal
- uses: actions/upload-artifact@v4
if: ${{ always() }}
with:
name: lint-results
path: '${{ github.workspace }}/**/build/**/reports/lint-results-*.html'
- name: Unwrap GPG key
if: github.event_name == 'push'
env:
GPG_KEY_CONTENTS: ${{ secrets.GPG_KEY_CONTENTS }}
SIGNING_SECRET_KEY_RING_FILE: ${{ secrets.SIGNING_SECRET_KEY_RING_FILE }}
run: sudo bash -c "echo '$GPG_KEY_CONTENTS' | base64 -d > '$SIGNING_SECRET_KEY_RING_FILE'"
- name: Publish
if: github.event_name == 'push'
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
OSSRH_USERNAME: ${{ secrets.OSSRH_USERNAME }}
OSSRH_PASSWORD: ${{ secrets.OSSRH_PASSWORD }}
SIGNING_KEY_ID: ${{ secrets.SIGNING_KEY_ID }}
SIGNING_PASSWORD: ${{ secrets.SIGNING_PASSWORD }}
SIGNING_SECRET_KEY_RING_FILE: ${{ secrets.SIGNING_SECRET_KEY_RING_FILE }}
run: ./gradlew publishReleasePublicationToGithubRepository | true
- uses: actions/cache@v4
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 slidr/build/outputs/aar/slidr-release.aar diffuse-source-file-release
shell: bash