Skip to content

Commit

Permalink
Merge pull request #46 from nimblehq/release/0.1.0
Browse files Browse the repository at this point in the history
[Release] 0.1.0
  • Loading branch information
nkhanh44 authored Aug 4, 2023
2 parents 06a59ef + 2abca76 commit 7626211
Show file tree
Hide file tree
Showing 124 changed files with 4,955 additions and 85 deletions.
2 changes: 2 additions & 0 deletions .env.sample
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
SECRET=
REST_API_ENDPOINT=
4 changes: 4 additions & 0 deletions .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# Team
# @minhnimble is the Engineering Lead
# @nkhanh44 is the Team Lead
* @nkhanh44 @Thieurom @doannimble @minhnimble
8 changes: 4 additions & 4 deletions .github/ISSUE_TEMPLATE/bug_template.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,12 @@ labels: "type : bug"

## Issue

Describe the issue you are facing. Show us the implementation: screenshots, GIFs, etc.

Describe the issue you are facing. Show us the implementation: screenshots, gif, etc.
## Expected

Describe what should be the correct behavior.

Describe what should be the correct behaviour.
## Steps to reproduce

1.
Expand Down
6 changes: 3 additions & 3 deletions .github/ISSUE_TEMPLATE/chore_template.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
---
name: "Chore"
about: "Open a chore issue for a minor update."
about: "Open a Chore for minor update."
title: "Update "
labels: "type : chore"
---

## Why

Describe the update in detail and why it is needed.

Describe the update details and why it's needed.
## Who Benefits?

Describe who will be the beneficiaries e.g. everyone, specific chapters, clients...
4 changes: 2 additions & 2 deletions .github/ISSUE_TEMPLATE/feature_template.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ labels: "type : feature"

## Why

Describe the big picture of the feature and why it is needed.

Describe the big picture of the feature and why it's needed.
## Who Benefits?

Describe who will be the beneficiaries e.g. everyone, specific chapters, clients...
9 changes: 6 additions & 3 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,15 @@

## What happened 👀

Provide a description of the **changes** this pull request brings to the codebase. Additionally, when the pull request is still being worked on, a checklist of the planned changes is welcome to track progress.
Describe the big picture of your changes here to communicate to the team why we should accept this pull request.

## Insight 📝

Describe in detail why this solution is the most appropriate, which solution you tried but did not go with, and how to test the changes. References to relevant documentation are welcome as well.
Describe in details how to test the changes, which solution you tried but did not go with, referenced documentation is
welcome as well.

## Proof Of Work 📹

Show us the implementation: screenshots, GIFs, etc.
Show us the implementation: screenshots, gif, etc.

<img src="URL_GOES_HERE" width=200 />
10 changes: 4 additions & 6 deletions .github/PULL_REQUEST_TEMPLATE/release_template.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,12 @@
Link to the milestone on Github e.g. https://github.com/nimblehq/git-templates/milestone/41?closed=1
or
Link to the project management tool for the release
Link to the milestone on Github e.g. https://github.com/nimblehq/survey-flutter/milestone/41?closed=1
or Link to the project management tool for the release

## Features

Provide the ID and title of the issue in the section for each type (feature, chore and bug). The link is optional.

- [sc-1234] As a user, I can log in
or
- [[sc-1234](https://app.shortcut.com/nimblehq/story/1234)] As a user, I can log in
- [#1] As a user, I can log in or
- [[#1](https://github.com/nimblehq/survey-flutter/issues/1)] As a user, I can log in

## Chores
- Same structure as in ## Feature
Expand Down
Empty file removed .github/wiki/.keep
Empty file.
51 changes: 51 additions & 0 deletions .github/workflows/android_deploy_production.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
name: Android - Deploy Production build to Firebase

on:
push:
branches:
- main

jobs:
build_and_deploy_android:
name: Build & Deploy Android
runs-on: ubuntu-latest
timeout-minutes: 30
steps:
- name: Check out
uses: actions/checkout@v3

- name: Set up Java JDK
uses: actions/setup-java@v3
with:
distribution: 'adopt'
java-version: '11'

- name: Set up Flutter environment
uses: subosito/flutter-action@v2
with:
channel: 'stable'
flutter-version: '3.10.5'

- name: Get Flutter dependencies
run: flutter pub get

- name: Run code generator
run: flutter packages pub run build_runner build --delete-conflicting-outputs

- name: Set up .env
env:
ENV_PRODUCTION: ${{ secrets.ENV_PRODUCTION }}
run: |
echo $ENV_PRODUCTION > .env
# App Bundle requires Firebase connected to Play Store to upload https://appdistribution.page.link/KPoa
- name: Build Android apk
run: flutter build apk --flavor production --debug --build-number $GITHUB_RUN_NUMBER

- name: Deploy Android Production to Firebase
uses: wzieba/[email protected]
with:
appId: ${{ secrets.FIREBASE_ANDROID_APP_ID_PRODUCTION }}
serviceCredentialsFileContent: ${{ secrets.FIREBASE_DISTRIBUTION_CREDENTIAL_JSON }}
groups: ${{ vars.FIREBASE_DISTRIBUTION_TESTER_GROUPS }}
file: build/app/outputs/flutter-apk/app-production-debug.apk
52 changes: 52 additions & 0 deletions .github/workflows/android_deploy_production_to_playstore.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
name: Android - Deploy Production build to Play Store

on:
push:
branches:
- main

jobs:
build_and_deploy_android:
name: Build & Deploy Android
runs-on: ubuntu-latest
timeout-minutes: 30
steps:
- name: Check out
uses: actions/checkout@v3

- name: Set up Java JDK
uses: actions/setup-java@v3
with:
distribution: 'adopt'
java-version: '11'

- name: Set up Flutter environment
uses: subosito/flutter-action@v2
with:
channel: 'stable'
flutter-version: '3.10.5'

- name: Get Flutter dependencies
run: flutter pub get

- name: Run code generator
run: flutter packages pub run build_runner build --delete-conflicting-outputs

- name: Set up .env
env:
ENV_PRODUCTION: ${{ secrets.ENV_PRODUCTION }}
run: |
echo $ENV_PRODUCTION > .env
- name: Build Production App Bundle
run: flutter build appbundle --flavor production --release --build-number $GITHUB_RUN_NUMBER

- name: Upload Android Production Release bundle to Play Store
uses: r0adkll/upload-google-play@v1
with:
serviceAccountJson: ${{ secrets.GOOGLE_PLAY_SERVICE_ACCOUNT_JSON }}
packageName: co.nimblehq.khanhthieu.survey
releaseFile: build/app/outputs/bundle/productionRelease/app-production-release.aab
track: internal
userFraction: 1.0
whatsNewDirectory: .github/workflows/whatsnew
51 changes: 51 additions & 0 deletions .github/workflows/android_deploy_staging.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
name: Android - Deploy Staging build to Firebase

on:
push:
branches:
- develop

jobs:
build_and_deploy_android:
name: Build & Deploy Android
runs-on: ubuntu-latest
timeout-minutes: 30
steps:
- name: Check out
uses: actions/checkout@v3

- name: Set up Java JDK
uses: actions/setup-java@v3
with:
distribution: 'adopt'
java-version: '11'

- name: Set up Flutter environment
uses: subosito/flutter-action@v2
with:
channel: 'stable'
flutter-version: '3.10.5'

- name: Get Flutter dependencies
run: flutter pub get

- name: Run code generator
run: flutter packages pub run build_runner build --delete-conflicting-outputs

- name: Set up .env.staging
env:
ENV_STAGING: ${{ secrets.ENV_STAGING }}
run: |
echo $ENV_STAGING > .env.staging
# App Bundle requires Firebase connected to Play Store to upload https://appdistribution.page.link/KPoa
- name: Build Android apk
run: flutter build apk --flavor staging --debug --build-number $GITHUB_RUN_NUMBER

- name: Deploy Android Staging to Firebase
uses: wzieba/[email protected]
with:
appId: ${{ secrets.FIREBASE_ANDROID_APP_ID_STAGING }}
serviceCredentialsFileContent: ${{ secrets.FIREBASE_STAGING_DISTRIBUTION_CREDENTIAL_JSON }}
groups: ${{ vars.FIREBASE_DISTRIBUTION_TESTER_GROUPS }}
file: build/app/outputs/flutter-apk/app-staging-debug.apk
49 changes: 49 additions & 0 deletions .github/workflows/bump_version.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
name: Bump Version

on:
workflow_dispatch:
inputs:
newVersion:
description: "New version"
required: true
type: string

jobs:
bump_version:
name: Bump version
runs-on: ubuntu-latest
timeout-minutes: 5
steps:
- name: Check out
uses: actions/checkout@v3
with:
token: ${{ secrets.GITHUB_TOKEN }}

- name: Set new version
run: |
perl -i -pe 's/^(version:\s+\d+\.\d+\.\d+\+)(\d+)$/"version: ${{ github.event.inputs.newVersion }}+".($2+1)/e' ./pubspec.yaml
- name: Create pull request
uses: peter-evans/create-pull-request@v4
with:
assignees: ${{ secrets.GITHUB_USER }}
token: ${{ secrets.WIKI_ACTION_TOKEN }}
commit-message: Bump version to ${{ github.event.inputs.newVersion }}
committer: Nimble Bot <[email protected]>
branch: chore/bump-version-to-${{ github.event.inputs.newVersion }}
delete-branch: true
title: '[Chore] Bump version to ${{ github.event.inputs.newVersion }}'
labels: |
type : chore
body: |
## What happened 👀
Bump version to ${{ github.event.inputs.newVersion }}
## Insight 📝
Automatically created by the Bump Version workflow.
## Proof Of Work 📹
On the Files changed tab
69 changes: 69 additions & 0 deletions .github/workflows/ios_deploy_production_to_testflight.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
name: iOS - Deploy Production build to TestFlight
on:
push:
branches:
- main

jobs:
build_and_upload_production_to_testflight:
name: Build and upload iOS Production build to TestFlight
runs-on: macOS-latest
steps:
- name: Check out
uses: actions/checkout@v3

- name: Install SSH key
uses: webfactory/[email protected]
with:
ssh-private-key: ${{ secrets.SSH_PRIVATE_KEY }}

- name: Set up Flutter environment
uses: subosito/flutter-action@v2
with:
channel: 'stable'
flutter-version: '3.10.5'
- run: flutter --version

- name: Set up deployment environment
env:
ENV_PRODUCTION: ${{ secrets.ENV_PRODUCTION }}
run: echo "$ENV_PRODUCTION" > .env

- name: Get Flutter dependencies
run: flutter pub get

- name: Run code generator
run: flutter packages pub run build_runner build --delete-conflicting-outputs

- name: Cache Ruby gems
uses: actions/cache@v3
id: bunlderCache
with:
path: ios/vendor/bundle
key: ${{ runner.os }}-gems-${{ hashFiles('**/Gemfile.lock') }}
restore-keys: ${{ runner.os }}-gems-

- name: Cache Pods
uses: actions/cache@v3
id: cocoapodCache
with:
path: ios/Pods
key: ${{ runner.os }}-pods-${{ hashFiles('**/Podfile.lock') }}
restore-keys: ${{ runner.os }}-pods-

- name: Install iOS dependencies
run: cd ios && bundle install --path vendor/bundle && bundle exec pod install

- name: Sync certificates and profiles
env:
MATCH_PASSWORD: ${{ secrets.MATCH_PASSPHRASE }}
run: cd ios && bundle exec fastlane sync_appstore_production_signing

- name: Build and Deploy to TestFlight
env:
BUILD_NUMBER: ${{ github.run_number }}
TEAM_ID: ${{ secrets.APPLE_TEAM_ID }}
APPSTORE_CONNECT_API_KEY_ID: ${{ secrets.APPSTORE_CONNECT_API_KEY_ID }}
APPSTORE_CONNECT_ISSUER_ID: ${{ secrets.APPSTORE_CONNECT_ISSUER_ID }}
APPSTORE_CONNECT_API_KEY_CONTENT: ${{ secrets.APPSTORE_CONNECT_API_KEY_CONTENT }}
run: cd ios && bundle exec fastlane build_and_upload_production_to_testflight
Loading

0 comments on commit 7626211

Please sign in to comment.