diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 4e47b008..3925c097 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -1,32 +1,37 @@ --- -name: build +name: Build Project -on: [push, pull_request] +on: + # Allows to run this workflow when a commit it pushed to the branch + push: + paths-ignore: + - "**/*.md" + branches: + - develop + + # Allows to run this workflow when a Pull Request is made with the set target branch + pull_request: + paths-ignore: + - "**/*.md" + branches: + - develop jobs: build: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - name: Checkout repository + uses: actions/checkout@v4 + - name: Set up JDK 17 - uses: actions/setup-java@v2 + uses: actions/setup-java@v4 with: - java-version: '17' - distribution: 'temurin' + java-version: "17" + distribution: "temurin" - - name: Cache Gradle packages - uses: actions/cache@v3 - with: - path: | - ~/.gradle/caches - ~/.gradle/wrapper - key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }} - restore-keys: | - ${{ runner.os }}-gradle- + - name: Setup Gradle + uses: gradle/actions/setup-gradle@v4 - name: Build run: ./gradlew check jacoco assemble - - - name: Codecov - uses: codecov/codecov-action@v3 diff --git a/.github/workflows/jitpack-build.yml b/.github/workflows/jitpack-build.yml new file mode 100644 index 00000000..69a2a377 --- /dev/null +++ b/.github/workflows/jitpack-build.yml @@ -0,0 +1,27 @@ +name: Force Jitpack Build + +on: + # Allows to run this workflow when a commit it pushed to the branch + push: + paths-ignore: + - "**/*.md" + branches: + - develop + + # Allows to run this workflow when a Pull Request is made with the set target branch + pull_request: + paths-ignore: + - "**/*.md" + branches: + - develop + +jobs: + build: + runs-on: ubuntu-latest + steps: + - name: Checkout repository + uses: actions/checkout@v4 + + - name: Trigger Jitpack Build + run: | + curl https://jitpack.io/api/builds/com.github.nisrulz/AppAuth-Android/develop-SNAPSHOT