Skip to content

Commit

Permalink
Create CI workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
cinit committed Dec 25, 2021
1 parent 8dfd29a commit 1e2efea
Showing 1 changed file with 58 additions and 0 deletions.
58 changes: 58 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
name: CI

on:
push:
branches: [ master ]
pull_request:
branches: [ master ]

jobs:
build:
runs-on: ubuntu-latest
if: ${{ !startsWith(github.event.head_commit.message, '[skip ci]') }}

steps:
- uses: actions/checkout@v2
with:
submodules: 'recursive'
fetch-depth: 0

- name: set up JDK 11
uses: actions/setup-java@v2
with:
java-version: '11'
distribution: 'adopt'
cache: gradle

- name: Cache Gradle Dependencies
uses: actions/cache@v2
with:
path: |
~/.gradle/caches
~/.gradle/wrapper
!~/.gradle/caches/build-cache-*
key: gradle-deps-core-${{ hashFiles('**/build.gradle') }}
restore-keys: |
gradle-deps
- name: Cache Gradle Build
uses: actions/cache@v2
with:
path: |
~/.gradle/caches/build-cache-*
key: gradle-builds-core-${{ github.sha }}
restore-keys: |
gradle-builds
- name: Grant execute permission for gradlew
run: chmod +x gradlew

- name: Build with Gradle
run: ./gradlew :app:assemble

- name: Upload Artifacts
uses: actions/upload-artifact@v2
# don't upload the artifacts if it's a pull request
if: ${{ !github.event.pull_request }}
with:
path: './app/build/outputs/*'

0 comments on commit 1e2efea

Please sign in to comment.