-
Notifications
You must be signed in to change notification settings - Fork 0
79 lines (72 loc) · 2.34 KB
/
sdk-ci.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
name: SDK / CI
on:
pull_request:
branches: [ "master" ]
types: [opened, synchronize]
permissions:
contents: read
security-events: write
jobs:
avoid_reduncy:
runs-on: ubuntu-24.04
steps:
- name: Cancel Previous Redundant Builds
uses: styfle/cancel-workflow-action@0.12.1
with:
access_token: ${{ github.token }}
check-for-cc:
runs-on: ubuntu-latest
steps:
- name: check-for-cc
id: check-for-cc
uses: agenthunt/conventional-commit-checker-action@v2.0.0
lint:
name: Lint
needs: [check-for-cc]
runs-on: ubuntu-24.04
continue-on-error: true
strategy:
matrix:
task: [ detekt, lint ]
steps:
- name: Checkout repository
uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4.2.1
- name: Setup Java
uses: actions/setup-java@b36c23c0d998641eff861008f374ee103c25ac73 # v4.4.0
with:
distribution: temurin
java-version: 17
- name: Setup Gradle
uses: gradle/gradle-build-action@ac2d340dc04d9e1113182899e983b5400c17cda1 # v3.5.0
- name: Run ${{ matrix.task }} task
run: ./gradlew ${{ matrix.task }}
- name: Upload SARIF files
uses: github/codeql-action/upload-sarif@c36620d31ac7c881962c3d9dd939c40ec9434f2b # v3.26.12
if: ${{ always() }}
with:
sarif_file: .
build:
name: Build
needs: [lint]
runs-on: ubuntu-24.04
steps:
- name: Checkout repository
uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4.2.1
- name: Setup Java
uses: actions/setup-java@b36c23c0d998641eff861008f374ee103c25ac73 # v4.4.0
with:
distribution: temurin
java-version: 17
- name: Setup Gradle
uses: gradle/gradle-build-action@ac2d340dc04d9e1113182899e983b5400c17cda1 # v3.5.0
- name: Assemble debug APKs
run: ./gradlew assembleDebug
- name: Create publish bundle
run: mkdir -p build/gh-app-publish/; find app/build/ -iname "*.apk" -exec mv "{}" build/gh-app-publish/ \;
- name: Upload artifacts
uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # v4.4.3
with:
name: build-artifacts
retention-days: 14
if-no-files-found: error
path: build/gh-app-publish/