Skip to content

chore(ci): run build-debug-apk only if actual source code has changed #404

chore(ci): run build-debug-apk only if actual source code has changed

chore(ci): run build-debug-apk only if actual source code has changed #404

Workflow file for this run

name: default
on:
push:
pull_request:
permissions:
pull-requests: write
jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: install ktlint
run: |
curl -sSLO https://github.com/pinterest/ktlint/releases/download/0.48.2/ktlint && chmod a+x ktlint && sudo mv ktlint /usr/local/bin/
- name: run ktlint
run: |
ktlint --reporter=checkstyle,output=build/ktlint-report.xml
continue-on-error: true
- uses: yutailang0119/action-ktlint@v3
with:
report-path: build/*.xml # Support glob patterns by https://www.npmjs.com/package/@actions/glob
continue-on-error: false # If annotations contain error of severity, action-ktlint exit 1.
build-release-apk:
needs: [lint]
if: github.event_name == 'push' && contains(github.ref, 'refs/tags/')
uses: ./.github/workflows/build-apk.yml
with:
build-type: release
secrets:
key-alias: ${{ secrets.KEY_ALIAS }}
keystore: ${{ secrets.KEYSTORE_B64 }}
key-password: ${{ secrets.KEY_PASSWORD }}
build-app-bundle:
needs: [lint]
if: github.event_name == 'push' && contains(github.ref, 'refs/tags/')
uses: ./.github/workflows/build-aab.yml
secrets:
key-alias: ${{ secrets.KEY_ALIAS }}
keystore: ${{ secrets.KEYSTORE_B64 }}
key-password: ${{ secrets.KEY_PASSWORD }}
release:
needs: [build-release-apk, build-app-bundle]
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Download APK
id: download-apk
uses: actions/download-artifact@v3
with:
name: ${{ needs.build-release-apk.outputs.filename }}
- name: Download App Bundle
id: download-bundle
uses: actions/download-artifact@v3
with:
name: ${{ needs.build-app-bundle.outputs.filename }}
- name: Release to GitHub
uses: softprops/action-gh-release@v1
with:
name: "v${{ github.ref_name }}"
generate_release_notes: true
files: |
dev.bluehouse.enablevolte.apk
dev.bluehouse.enablevolte.aab