Skip to content

Commit

Permalink
Merge pull request #369 from CollActionteam/cicd/use-environment
Browse files Browse the repository at this point in the history
cicd: use environment
  • Loading branch information
Xazin authored Mar 4, 2023
2 parents f38cdb6 + 79a3f4c commit b564d68
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ jobs:

- name: Statically analyze the Dart code
run: |
echo ${{ secrets.ENV }} | base64 -d > .env
echo "" | base64 -d > .env
flutter analyze .
test:
Expand Down Expand Up @@ -96,7 +96,7 @@ jobs:
- name: Run tests and generate coverage
run: |
echo ${{ secrets.ENV }} | base64 -d > .env
echo "" | base64 -d > .env
flutter test --coverage -r expanded .
- name: Upload coverage to codecov
Expand All @@ -107,6 +107,7 @@ jobs:

build_android:
if: ${{ github.ref == 'refs/heads/development' || github.ref == 'refs/heads/master' }}
environment: ${{ github.ref == 'refs/heads/master' && 'production' || 'development' }}
needs: [analyze, test]
runs-on: macos-latest
timeout-minutes: 60
Expand Down Expand Up @@ -189,6 +190,7 @@ jobs:

build_ios:
if: ${{ github.ref == 'refs/heads/development' || github.ref == 'refs/heads/master' }}
environment: ${{ github.ref == 'refs/heads/master' && 'production' || 'development' }}
needs: [analyze, test]
runs-on: macos-latest
timeout-minutes: 60
Expand Down Expand Up @@ -332,6 +334,7 @@ jobs:
run: widgetbook publish --api-key $WIDGETBOOK_API_KEY

distribute_android:
environment: ${{ github.ref == 'refs/heads/master' && 'production' || 'development' }}
needs: [build_android]
runs-on: ubuntu-latest
steps:
Expand All @@ -350,6 +353,7 @@ jobs:
releaseNotesFile: release_notes.txt

distribute_ios:
environment: ${{ github.ref == 'refs/heads/master' && 'production' || 'development' }}
needs: [build_ios]
runs-on: macos-latest
steps:
Expand Down

0 comments on commit b564d68

Please sign in to comment.