I'm running a Github action that automatically builds and releases a flutter project. But we use a dev and a production Firebase environment. so before the build I'd like to switch out the google-services.json from the dev to the production version. But I can't seem to find an easy way to do this. Or is there a better way to work with dev and production versions of Firebase inside flutter?
probably not very useful but here's the action in it's current state
on:
push:
branches: [ stable ]
name: Build and Release
jobs:
build:
name: Build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
with:
fetch-depth: '0'
- name: Bump version and push tag
id: tag
uses: anothrNick/github-tag-action@1.17.2
env:
GITHUB_TOKEN: ${{ secrets.TOKEN }}
WITH_V: true
RELEASE_BRANCHES: stable
- uses: actions/checkout@v1
- uses: actions/setup-java@v1
with:
java-version: '12.x'
- uses: subosito/flutter-action@v1
with:
flutter-version: '1.17.3'
- run: flutter pub get
- run: flutter build appbundle
- name: Create a Release APK
uses: ncipollo/release-action@v1
with:
artifacts: "build/app/outputs/bundle/release/*.aab"
tag: ${{ steps.tag.outputs.tag }}
token: ${{ secrets.TOKEN }}
I'm very, very new to github actions and CI in general. any constructive feedback is always welcome!