Skip to content

feat: make lint and build parallel #38

feat: make lint and build parallel

feat: make lint and build parallel #38

Workflow file for this run

name: ci
on: [push, pull_request]
jobs:
checkout:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Bump version
id: bump_version
uses: oflynned/android-version-bump@master
if: github.ref == 'refs/heads/master'
with:
token: ${{secrets.PAT}}
- uses: actions/setup-java@v3
with:
distribution: 'zulu' # See 'Supported distributions' for available options
java-version: '18'
- name: Cache Gradle and wrapper
uses: actions/cache@v2
with:
path: |
~/.gradle/caches
~/.gradle/wrapper
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*') }}
lint:
runs-on: ubuntu-latest
needs: checkout
steps:
- name: Build Release apk
run: ./gradlew lintRelease
build:
runs-on: ubuntu-latest
needs: checkout
if: github.ref == 'refs/heads/master'
steps:
- name: Build Release apk
run: ./gradlew assembleRelease
deploy:
runs-on: ubuntu-latest
needs: build
if: github.ref == 'refs/heads/master'
steps:
- name: Rename release
run: mv app/build/outputs/apk/release/app-release.apk app/build/outputs/apk/release/aa-torque.apk
- name: Create Github Release
uses: softprops/action-gh-release@v1
with:
tag_name: ${{ steps.bump_version.outputs.new_tag }}
name: ${{ steps.bump_version.outputs.new_tag }}
generate_release_notes: true
draft: true
files: |
app/build/outputs/apk/release/aa-torque.apk