Nepanikar chat time change (#183) #146
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Continuous Integration / GitHub release | |
on: | |
push: | |
branches: [ main ] | |
workflow_dispatch: # can be triggered manually | |
env: | |
flutter_version: '3.7.1' | |
CI: false | |
# These are debug values and are not used in production (workaround for this error https://stackoverflow.com/q/54457245): | |
CM_KEYSTORE_PATH: 'nepanikar_debug.keystore' | |
CM_KEYSTORE_PASSWORD: 'android' | |
CM_KEY_ALIAS: 'androiddebugkey' | |
CM_KEY_PASSWORD: 'android' | |
jobs: | |
android: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Flutter SDK cache | |
uses: subosito/flutter-action@v2 | |
with: | |
flutter-version: ${{ env.flutter_version }} | |
cache: true | |
cache-key: ${{ runner.OS }}-flutter-${{ env.flutter_version }} | |
cache-path: ${{ runner.tool_cache }}/flutter | |
- name: Install dependencies | |
run: flutter pub get | |
- name: Gradle cache | |
uses: gradle/gradle-build-action@v2 | |
- name: Run prebuild script | |
run: sh ./bin/ci_workflow_scripts/prebuild_v2.sh ${{github.run_number}} | |
- name: Build apk | |
run: flutter build apk --release | |
- name: GitHub release | |
uses: ncipollo/release-action@v1 | |
if: github.event_name != 'pull_request' | |
with: | |
name: Android build (dev-0.2.${{github.run_number}}) | |
commit: ${{ github.sha }} | |
tag: dev-0.2.${{github.run_number}} | |
artifacts: "build/app/outputs/flutter-apk/app-release.apk" | |
token: ${{ secrets.GITHUB_TOKEN }} | |