You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
137 lines
4.5 KiB
YAML
137 lines
4.5 KiB
YAML
name: Android build PR
|
|
on:
|
|
pull_request_target:
|
|
branches:
|
|
- fork
|
|
jobs:
|
|
run-build:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Checkout repository
|
|
uses: actions/checkout@v2
|
|
- name: Setup Java
|
|
uses: actions/setup-java@v1
|
|
with:
|
|
java-version: 11
|
|
- name: Create local.properties (to sign release apk with debug keys)
|
|
run: echo "autosignReleaseWithDebugKey=" >local.properties
|
|
- name: Build forkRelease variant of app
|
|
uses: eskatos/gradle-command-action@v1
|
|
with:
|
|
wrapper-cache-enabled: true
|
|
dependencies-cache-enabled: true
|
|
configuration-cache-enabled: true
|
|
arguments: assembleForkRelease -PversionName="$(git describe --tags HEAD)"
|
|
- name: Archive arm64 apk
|
|
uses: actions/upload-artifact@v2
|
|
with:
|
|
name: app-arm64-v8a-forkRelease.apk
|
|
path: app/build/outputs/apk/forkRelease/app-arm64-v8a-forkRelease.apk
|
|
- name: Archive armeabi apk
|
|
uses: actions/upload-artifact@v2
|
|
with:
|
|
name: app-armeabi-v7a-forkRelease.apk
|
|
path: app/build/outputs/apk/forkRelease/app-armeabi-v7a-forkRelease.apk
|
|
- name: Archive x86 apk
|
|
uses: actions/upload-artifact@v2
|
|
with:
|
|
name: app-x86-forkRelease.apk
|
|
path: app/build/outputs/apk/forkRelease/app-x86-forkRelease.apk
|
|
- name: Archive x86_64 apk
|
|
uses: actions/upload-artifact@v2
|
|
with:
|
|
name: app-x86_64-forkRelease.apk
|
|
path: app/build/outputs/apk/forkRelease/app-x86_64-forkRelease.apk
|
|
- name: Comment on PR with link to checks page
|
|
uses: mshick/add-pr-comment@v1
|
|
with:
|
|
message: |
|
|
### Download the built apks
|
|
You can download the apks built by Github actions after the CI checks pass.
|
|
Please go to the <a href="https://github.com/fork-maintainers/iceraven-browser/pull/${{ github.event.number }}/checks">checks page for this PR</a> to find the zipped apk files under the artifacts drop-down, as seen in the example screenshot below.
|
|
|
|
<img src="https://raw.githubusercontent.com/fork-maintainers/iceraven-browser/fork/.github/imgs/download-artifacts-screenshot.png" />
|
|
repo-token: ${{ secrets.GITHUB_TOKEN }}
|
|
allow-repeats: false
|
|
|
|
run-testDebug:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Checkout repository
|
|
uses: actions/checkout@v2
|
|
- name: Setup Java
|
|
uses: actions/setup-java@v1
|
|
with:
|
|
java-version: 11
|
|
- name: Run tests
|
|
uses: eskatos/gradle-command-action@v1
|
|
with:
|
|
wrapper-cache-enabled: true
|
|
dependencies-cache-enabled: true
|
|
configuration-cache-enabled: true
|
|
arguments: testDebug
|
|
|
|
|
|
run-detekt:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Checkout repository
|
|
uses: actions/checkout@v2
|
|
- name: Setup Java
|
|
uses: actions/setup-java@v1
|
|
with:
|
|
java-version: 11
|
|
- name: Run detekt
|
|
uses: eskatos/gradle-command-action@v1
|
|
with:
|
|
wrapper-cache-enabled: true
|
|
dependencies-cache-enabled: true
|
|
configuration-cache-enabled: true
|
|
arguments: detekt
|
|
- name: Archive detekt results
|
|
uses: actions/upload-artifact@v2
|
|
with:
|
|
name: detekt report
|
|
path: build/reports/detekt.html
|
|
|
|
|
|
run-ktlint:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Checkout repository
|
|
uses: actions/checkout@v2
|
|
- name: Setup Java
|
|
uses: actions/setup-java@v1
|
|
with:
|
|
java-version: 11
|
|
- name: Run ktlint
|
|
uses: eskatos/gradle-command-action@v1
|
|
with:
|
|
wrapper-cache-enabled: true
|
|
dependencies-cache-enabled: true
|
|
configuration-cache-enabled: true
|
|
arguments: ktlint
|
|
|
|
|
|
run-lintDebug:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Checkout repository
|
|
uses: actions/checkout@v2
|
|
- name: Setup Java
|
|
uses: actions/setup-java@v1
|
|
with:
|
|
java-version: 11
|
|
- name: Run lintDebug
|
|
uses: eskatos/gradle-command-action@v1
|
|
with:
|
|
wrapper-cache-enabled: true
|
|
dependencies-cache-enabled: true
|
|
configuration-cache-enabled: true
|
|
arguments: lintDebug
|
|
- name: Archive lint results
|
|
uses: actions/upload-artifact@v2
|
|
with:
|
|
name: lintDebug report
|
|
path: app/build/reports/lint-results-debug.html
|