Skip to content

Example Test Build

Example Test Build #34

Workflow file for this run

name: Example Test Build
on:
release:
types: [ published ]
jobs:
build:
env:
working-directory: ./example
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Access secret key
run: |
mkdir assets/ assets/config/
echo "KAKAO_API_KEY=$KAKAO_API_KEY" >> assets/config/.env
env:
KAKAO_API_KEY: ${{secrets.KAKAO_API_KEY}}
working-directory: ${{ env.working-directory }}
- name: Install Flutter SDK
run: |
/usr/bin/git clone https://github.com/flutter/flutter.git .flutter -b stable
working-directory: ${{ env.working-directory }}
- name: Setup Flutter
run: |
.flutter/bin/flutter precache --android
working-directory: ${{ env.working-directory }}
- name: Setup Java 18 (Amazon Corretto)
uses: actions/setup-java@v4
with:
distribution: 'corretto'
java-version: '18'
- name: Install dependencies
run: |
.flutter/bin/flutter pub get
working-directory: ${{ env.working-directory }}
- name: Build Application(APK)
run: |
.flutter/bin/flutter build apk --release
working-directory: ${{ env.working-directory }}
- name: Upload application pacakge.
uses: actions/upload-artifact@v4
with:
name: application
path: example/build/app/outputs/apk/release/app-release.apk
deploy:
needs: build
runs-on: ubuntu-latest
permissions:
contents: write
environment:
name: android-apk
url: ${{ fromJSON(steps.deployment.outputs.assets)[0].browser_download_url }}
steps:
- name: Download application package.
uses: actions/download-artifact@v4
with:
name: application
path: ./
- name: Upload application pacakge to release
id: deployment
uses: softprops/action-gh-release@v2
with:
files: |
./app-release.apk