Skip to content

Commit cb8132f

Browse files
authored
Update GitHub Actions (#8)
* update build github action * added jitpack build to force jitpack to trigger a build whenever a commit lands on develop branch
1 parent 1abc93c commit cb8132f

2 files changed

Lines changed: 50 additions & 18 deletions

File tree

.github/workflows/build.yml

Lines changed: 23 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,32 +1,37 @@
11
---
2-
name: build
2+
name: Build Project
33

4-
on: [push, pull_request]
4+
on:
5+
# Allows to run this workflow when a commit it pushed to the branch
6+
push:
7+
paths-ignore:
8+
- "**/*.md"
9+
branches:
10+
- develop
11+
12+
# Allows to run this workflow when a Pull Request is made with the set target branch
13+
pull_request:
14+
paths-ignore:
15+
- "**/*.md"
16+
branches:
17+
- develop
518

619
jobs:
720
build:
821
runs-on: ubuntu-latest
922

1023
steps:
11-
- uses: actions/checkout@v3
24+
- name: Checkout repository
25+
uses: actions/checkout@v4
26+
1227
- name: Set up JDK 17
13-
uses: actions/setup-java@v2
28+
uses: actions/setup-java@v4
1429
with:
15-
java-version: '17'
16-
distribution: 'temurin'
30+
java-version: "17"
31+
distribution: "temurin"
1732

18-
- name: Cache Gradle packages
19-
uses: actions/cache@v3
20-
with:
21-
path: |
22-
~/.gradle/caches
23-
~/.gradle/wrapper
24-
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }}
25-
restore-keys: |
26-
${{ runner.os }}-gradle-
33+
- name: Setup Gradle
34+
uses: gradle/actions/setup-gradle@v4
2735

2836
- name: Build
2937
run: ./gradlew check jacoco assemble
30-
31-
- name: Codecov
32-
uses: codecov/codecov-action@v3
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
name: Force Jitpack Build
2+
3+
on:
4+
# Allows to run this workflow when a commit it pushed to the branch
5+
push:
6+
paths-ignore:
7+
- "**/*.md"
8+
branches:
9+
- develop
10+
11+
# Allows to run this workflow when a Pull Request is made with the set target branch
12+
pull_request:
13+
paths-ignore:
14+
- "**/*.md"
15+
branches:
16+
- develop
17+
18+
jobs:
19+
build:
20+
runs-on: ubuntu-latest
21+
steps:
22+
- name: Checkout repository
23+
uses: actions/checkout@v4
24+
25+
- name: Trigger Jitpack Build
26+
run: |
27+
curl https://jitpack.io/api/builds/com.github.nisrulz/AppAuth-Android/develop-SNAPSHOT

0 commit comments

Comments
 (0)