Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Housekeep/update new project guideline #50

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 12 additions & 19 deletions ios/new-project.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,8 @@
- [ ] Open [iOS project template](https://github.com/futuredapp/iOS-project-template) and use it to create new repository. Preferred repo name is *[productname]-[platform]*, where *[productname]* includes only name of the product, without client name (like Skoda).
- [ ] Create `develop` branch and set is as a default branch.
- [ ] Go to Settings tab > General and disable **Wiki**, **Issues**, **Projects** features we do not use.
- [ ] Enable **Automatically delete head branches** so there is no need to delete branches manually after each PR merge.
- [ ] Enable **Automatically delete head branches** so there is no need to delete branches manually after each PR merge. (repo - general settings)
- [ ] Add `Write` role to `futuredapp/ios` team in Access > Collaborators and teams.

- [ ] In Code and Automation > Branches, add branch protection rules to patterns `develop` and `main` branches exactly as shown in the following screenshot:

![GitHub branch protection](../general/attachments/GitHub_branch_protection.png)
Expand Down Expand Up @@ -39,9 +38,8 @@ Update your Ruby using your preferred ruby version manager. and install latest v

Add following dependecies using Swift Package manager:

- <https://github.com/futuredapp/FuturedKit> (SwiftUI project)
- <https://github.com/futuredapp/FTAPIKit> (Project using REST API)
- <https://github.com/futuredapp/FTTestingKit> (only to test target)
- [ ] Remove `Podfile`.
- [ ] Open Xcode and add all relevant packages to the project

## 5. Configure SwiftLint

Expand All @@ -67,32 +65,27 @@ fi
- [ ] In Target's Signing & Capabilities tab, uncheck the *Automatically manage signing* checkbox.
- [ ] In Manage Schemes..., set root project scheme as Shared.
- [ ] Run `bundle exec fastlane test` to check whether test can be run on both CI and locally.
- [ ] In Xcode, go to Project Info screen. In Configurations section, add a new configuration by duplicating the **Release** configuration and rename it to **Enterprise**.
- [ ] On Build Settings tab for target (not project), look for Product Bundle Identifier, expand it to see preferences for Debug, Enterprise and Release configurations and for the Enterprise one, add suffix `.beta`.
- [ ] In Xcode, go to Project Info screen. In Configurations section, add a new configuration by duplicating the **Release** configuration and rename it to **Beta**.
- [ ] On Build Settings tab for target (not project), look for Product Bundle Identifier, expand it to see preferences for Debug, Beta and Release configurations and for the Beta one, add suffix `.beta`.
- [ ] Select appropriate certificates, provisioning profiles for all configurations in the Target's Signing & Capabilities tab.
- [ ] Run `bundle exec fastlane enterprise` to check whether enteprise builds to App Center succeed (See [where to find an API token](https://intercom.help/appcenter/en/articles/1841885-how-to-use-app-center-s-api)).

## 7. Setup App Center

***Note:** The app should be automatically created and submitted to App Center to your account during step 6 by running `bundle exec fastlane enterprise` in Terminal.*

- [ ] Find the app under your account, go to its Settings, in top right corner find three dots and *Transfer app to organization* (select Futured).
- [ ] Add all internal teams as collaborators.
- [ ] Create distribution group for the client and invite them.
- [ ] Set proper values in Versioning part of Build Settings:
- [ ] Change Marketing Version to `1.0.0`.
- [ ] Change Current Project Version to `1`.
- [ ] Run `bundle exec fastlane beta` to check whether beta builds to TestFlight succeed.

## 8. Configure continuous integration
## 7. Configure continuous integration

Choose your CI service, we currently prefer Github Actions.

### GitHub Actions

Most of the configuration is already part of the [iOS project template](https://github.com/futuredapp/iOS-project-template). All the secrets are provided by the organization. If they are not available ask someone with admin permissions to provide them to your repository.

## 9. Open pull request with the project setup
## 8. Open pull request with the project setup

- [ ] Update CODEOWNERS file.
- [ ] Update project README and fill in all the strike-through points.
- [ ] Commit everything and open PR and add this filled checklist to description.
- [ ] After CI checks the PR, status checks are now available to be added in Branch protections settings. Add them.

## 10. Enjoy!
## 9. Enjoy!
20 changes: 7 additions & 13 deletions ios/releases.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,16 +9,10 @@

## Source control steps to release

1. Create a branch `release/[version]-[build_number]`, where `[version]` is the new build number to be released
and `[build_number]` will be the incremented build number.
2. Bump the build number and version number. Build numbers are incremental, starting with `1`. Version numbers have `x.y.z` format,
where `x` represents major, `y` minor and `z` patch number.

Fastlane must be used for this by calling `bundle exec fastlane bump`, `bundle exec fastlane bump type:minor`, `bundle exec fastlane bump type:major`.
3. Commit and push changes. Send a pull request from `release/[version]` to `main`.
4. When merged, create a new tag on `main` with `[version]` value.
5. Create a pull request from `main` to `develop`.
6. After merge, create new release on GitHub from `main` branch with semantic version tag `x.y.z-[build_number]`.
7. If continuous delivery is configured, release build and App Store submission will be processed automatically. Otherwise call `bundle exec fastlane beta` to submit the build manually.
8. When build is processed to App Store Connect, submit it to TestFlight first and let the tester go through it and ideally go through it yourself too.
9. Only when tester approves the build, proceed with sending the update to the review.
1. Create a branch `release/[version]`, where `[version]` is the new build number to be released.
2. Commit and push changes. Send a pull request from `release/[version]` to `main`.
3. When merged, create a new tag on `main` with `[version]` value.
4. Create a pull request from `main` to `develop`.
5. After merge, create new release on GitHub from `main` branch with semantic version tag `x.y.z`. If continuous delivery is configured, release build and App Store submission will be processed automatically.
6. When build is processed to App Store Connect, let the tester go through it and ideally go through it yourself too.
7. Only when tester approves the build, proceed with sending the update to the review.