Skip to content

Commit

Permalink
feat(cicd): build APK artifact
Browse files Browse the repository at this point in the history
  • Loading branch information
mikucat0309 committed Dec 22, 2023
1 parent e16cfa8 commit 1d10fb8
Show file tree
Hide file tree
Showing 3 changed files with 67 additions and 1 deletion.
33 changes: 33 additions & 0 deletions .github/workflows/build-dev-apk.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: Build Dev APK

on:
push:
branches:
- 'main'
workflow_dispatch:

jobs:
build:
name: Build
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4

- uses: actions/setup-java@v4
with:
distribution: temurin
java-version: '17'

- uses: gradle/gradle-build-action@v2
with:
gradle-version: 8.4

- name: Build APK
run: gradle :app:assembleRelease

- uses: actions/upload-artifact@v4
with:
name: apk-${{ github.sha }}
path: app/build/outputs/apk/release/app-release.apk
if-no-files-found: error
33 changes: 33 additions & 0 deletions .github/workflows/build-release-apk.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: Build Release APK

on:
push:
tags:
- 'v*'
workflow_dispatch:

jobs:
build:
name: Build
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4

- uses: actions/setup-java@v4
with:
distribution: temurin
java-version: '17'

- uses: gradle/gradle-build-action@v2
with:
gradle-version: 8.4

- name: Build APK
run: gradle :app:assembleRelease

- uses: actions/upload-artifact@v4
with:
name: apk-${{ github.ref_name }}
path: app/build/outputs/apk/release/app-release.apk
if-no-files-found: error
2 changes: 1 addition & 1 deletion .github/workflows/detekt.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ jobs:

- name: Run Detekt
continue-on-error: true
run: gradle :app:detekt --no-daemon
run: gradle :app:detekt

- uses: github/codeql-action/upload-sarif@v2
with:
Expand Down

0 comments on commit 1d10fb8

Please sign in to comment.