Skip to content

Commit

Permalink
Merge pull request #81 from nimblehq/release/0.7.0
Browse files Browse the repository at this point in the history
Release 0.7.0 (8)
  • Loading branch information
manh-t authored May 16, 2022
2 parents 60e5551 + 6fcf24a commit d000192
Show file tree
Hide file tree
Showing 23 changed files with 812 additions and 47 deletions.
8 changes: 3 additions & 5 deletions .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
# Team Lead
* @manh-t

# Team Members
* @doannimble @luongvo @markgravity
# Team
# @manh-t is the Team Lead
* @manh-t @doannimble @luongvo @markgravity

# Engineering Leads
CODEOWNERS @nimblehq/engineering-leads
32 changes: 32 additions & 0 deletions .github/wiki/Deployment.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
# Deployment Process

## For iOS

### Guide

- Before deploying the iOS application, we have to prepare the necessary credentials and information:

- An Apple developer account.
- Your application’s bundle id. This could be multiple bundle ids according to the number of application’s flavors.
- A new app's on Apple Store Connect that links to the bundle id.
- The access to Git’s [Match repository](https://codesigning.guide/).

- Create certificates for distribution and [code signing](https://codesigning.guide/) so we are able to fetch the certificates through [Match](https://docs.fastlane.tools/actions/match/).
- Setup [Fastlane](https://docs.fastlane.tools/getting-started/ios/setup/) and [Match](https://docs.fastlane.tools/actions/match/).
- Adding these variables as the environment variable of CI:

- **FASTLANE_USER**: This will be referred to in `Appfile` and `Fastfile`. Set your Apple ID to this variable.
- **FASTLANE_PASSWORD**: This variable will be referred to internally in Fastlane. Set the password of your Apple ID to this variable.
- **FASTLANE_APPLE_APPLICATION_SPECIFIC_PASSWORD**: We need to generate an `application specific password` to upload your app to TestFlight. Reference [here](https://support.apple.com/en-us/HT204397).
- **FASTLANE_SESSION**: When your Apple ID has Two-Factor Authentication or Two-Step verification information, we can’t validate your Apple ID with a prompt on your CI machine. We need to generate a login session for Apple ID in advance with `spaceauth`. Please check `Method 2: Two-step or two-factor authentication` in [here](https://docs.fastlane.tools/getting-started/ios/authentication/) to get the fastlane session and read the note in `Important note about session duration`.
- **MATCH_PASSWORD**: This will be referred to internally in `fastlane match` to decrypt your profiles. We can get the password from the one who has Admin access in Apple Store Connect.
- **KEYCHAIN_PASSWORD**: We can create a keychain password for ourself and it could be anything.
- **SSH_PRIVATE_KEY**: In order to fetch the distribution files from Git’s [Match repository](https://codesigning.guide/), we have to generate an SSH key and save it as the environment variable in CI.

- Run the corresponding workflows CI or `fastlane` commands and enjoy the result!

### Resource

- [https://medium.com/flutter-community/deploying-flutter-ios-apps-with-fastlane-and-github-actions-2e87465e056e](https://medium.com/flutter-community/deploying-flutter-ios-apps-with-fastlane-and-github-actions-2e87465e056e)
- [https://docs.flutter.dev/deployment/cd](https://docs.flutter.dev/deployment/cd)
- [https://jaysavsani07.medium.com/flutter-ci-cd-with-github-actions-fastlane-part-2-ios-a4b281921d39](https://jaysavsani07.medium.com/flutter-ci-cd-with-github-actions-fastlane-part-2-ios-a4b281921d39)
17 changes: 17 additions & 0 deletions .github/workflows/publish_docs_to_wiki.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
name: Publish docs to Wiki
on:
push:
paths:
- .github/wiki/**
branches:
- main

jobs:
publish_docs_to_wiki:
name: Publish Wiki
uses: nimblehq/github-actions-workflows/.github/workflows/[email protected]
with:
USER_NAME: team-nimblehq
USER_EMAIL: [email protected]
secrets:
USER_TOKEN: ${{ secrets.WIKI_ACTION_TOKEN }}
25 changes: 25 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: CI
on:
# Trigger the workflow on push or pull request,
# but push action is only for the feature branch
pull_request:
types: [ opened, synchronize, reopened ]
push:
branches-ignore:
- develop
- 'release/**'
- main

jobs:
test:
name: Template initializing scripts test
runs-on: ubuntu-latest
steps:
- uses: actions/[email protected]

- uses: actions/setup-python@v2
with:
python-version: '3.9'

- name: Set new project
run: make run PACKAGE_NAME=co.nimblehq.flutter.template PROJECT_NAME=flutter_templates APP_NAME="Flutter Templates"
50 changes: 50 additions & 0 deletions .template/.github/workflows/ios_deployment.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
name: ios-deployment
on:
# Trigger the workflow on push action
push:
branches:
- develop

jobs:
build_and_upload_to_testflight:
name: Build And Upload iOS Application To TestFlight
runs-on: macOS-latest
env:
TEAM_ID: ${{ secrets.TEAM_ID }}
FASTLANE_USER: ${{ secrets.FASTLANE_USER }}
FASTLANE_PASSWORD: ${{ secrets.FASTLANE_PASSWORD }}
FASTLANE_APPLE_APPLICATION_SPECIFIC_PASSWORD: ${{ secrets.FASTLANE_APPLE_APPLICATION_SPECIFIC_PASSWORD }}
FASTLANE_SESSION: ${{ secrets.FASTLANE_SESSION }}
MATCH_PASSWORD: ${{ secrets.MATCH_PASSWORD }}
KEYCHAIN_PASSWORD: ${{ secrets.KEYCHAIN_PASSWORD }}
steps:
- uses: actions/checkout@v1

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

- uses: subosito/flutter-action@v1
with:
channel: 'stable'
flutter-version: '2.10.3'

- name: Get flutter dependencies
run: flutter pub get

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

- name: Bundle install
run: cd ./ios && bundle install

- name: Pod install
run: cd ./ios && pod install

- name: Match AppStore
run: cd ./ios && bundle exec fastlane sync_appstore_staging_signing

- name: Deploy to TestFlight
run: |
cd ./ios && bundle exec fastlane build_and_upload_testflight_app
7 changes: 7 additions & 0 deletions .template/ios/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,15 @@ Flutter/app.flx
Flutter/app.zip
Flutter/flutter_assets/
Flutter/flutter_export_environment.sh
Flutter/tmp.xcconfig
Flutter/.last_build_id
ServiceDefinitions.json
Runner/GeneratedPluginRegistrant.*
Build/
DerivedData/
fastlane/README.md
fastlane/report.xml
.envfile

# Exceptions to above rules.
!default.mode1v3
Expand Down
4 changes: 4 additions & 0 deletions .template/ios/Gemfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
source "https://rubygems.org"

gem "fastlane"
gem "cocoapods"
Loading

0 comments on commit d000192

Please sign in to comment.