cleanup and documentation
Some checks failed
Build and release APK / Build APK (pull_request) Failing after 9m4s
Some checks failed
Build and release APK / Build APK (pull_request) Failing after 9m4s
This commit is contained in:
parent
d4066a1726
commit
db821b4856
@ -2,10 +2,11 @@ on:
|
|||||||
push:
|
push:
|
||||||
tags:
|
tags:
|
||||||
- v*
|
- v*
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
push-to-remote:
|
push-to-remote:
|
||||||
# We want to use the macos runner provided by github actions. This requires to push to a remote first.
|
# We want to use the macos runner provided by github actions. This requires to push to a remote first.
|
||||||
# After the push we can use the action under .github/actions/ to deploy properly using fastlane on macos.
|
# After the push we can use the action under frontend/.github/actions/ to deploy properly using fastlane on macos.
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout code
|
- name: Checkout code
|
||||||
|
@ -8,13 +8,13 @@ jobs:
|
|||||||
runs-on: macos-lastest
|
runs-on: macos-lastest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v2
|
||||||
|
|
||||||
- name: Set up ruby env
|
- name: Set up ruby env
|
||||||
uses: ruby/setup-ruby@v1.138.0
|
uses: ruby/setup-ruby@v1.138.0
|
||||||
with:
|
with:
|
||||||
ruby-version: 3.2.1
|
ruby-version: 3.2.1
|
||||||
bundler-cache: true
|
bundler-cache: true
|
||||||
|
|
||||||
- name: Setup java for android build
|
- name: Setup java for android build
|
||||||
uses: actions/setup-java@v4
|
uses: actions/setup-java@v4
|
||||||
with:
|
with:
|
||||||
@ -33,7 +33,7 @@ jobs:
|
|||||||
echo "VERSION=${REF_NAME//v}" >> $GITHUB_ENV
|
echo "VERSION=${REF_NAME//v}" >> $GITHUB_ENV
|
||||||
|
|
||||||
- name: Run fastlane lane
|
- name: Run fastlane lane
|
||||||
run: bundle exec fastlane android build
|
run: bundle exec fastlane deploy
|
||||||
working-directory: android
|
working-directory: android
|
||||||
env:
|
env:
|
||||||
VERSION_NAME: ${{outputs.version.VERSION}}
|
VERSION_NAME: ${{outputs.version.VERSION}}
|
||||||
|
@ -26,16 +26,32 @@ To update the icons, change the `flutter_launcher_icons.yaml` configuration file
|
|||||||
dart run flutter_launcher_icons
|
dart run flutter_launcher_icons
|
||||||
```
|
```
|
||||||
|
|
||||||
|
### Deploying a new version
|
||||||
|
To truly deploy a new version of the application, i.e. to the official app stores, a special CI step is required. This listens for new tags. To create a new tag position yourself on the main branch and run
|
||||||
|
```bash
|
||||||
|
git tag -a v<name> -m "Release <name>"
|
||||||
|
git push origin v<name>
|
||||||
|
```
|
||||||
|
We adhere to the [Semantic Versioning](https://semver.org/) standard, so the tag should be of the form `v0.1.8` for example.
|
||||||
|
|
||||||
## Deployment (using fastlane)
|
|
||||||
The application is deployed to the Google Play Store and the Apple App Store using fastlane:
|
|
||||||
|
|
||||||
[https://docs.fastlane.tools/](https://docs.fastlane.tools/)
|
## Fastlane - in depth
|
||||||
|
The application is deployed to the Google Play Store and the Apple App Store using fastlane: [https://docs.fastlane.tools/](https://docs.fastlane.tools/)
|
||||||
|
|
||||||
Fastlane is installed as a Ruby gem. Since the bundler-gemfile is scoped to a single directory, a gemfile is included in both the `android` and `ios` directories. Once installed, the usage is
|
Fastlane is installed as a Ruby gem. Since the bundler-gemfile is scoped to a single directory, a `Gemfile` is included in both the `android` and `ios` directories. Once installed, the usage is
|
||||||
```bash
|
```bash
|
||||||
cd frontend/android # or ios
|
cd frontend/android # or ios
|
||||||
bundle install
|
bundle install
|
||||||
bundle exec fastlane <lane>
|
bundle exec fastlane <lane>
|
||||||
```
|
```
|
||||||
This is reused in the CI/CD pipeline to automate the deployment process.
|
This is reused in the CI/CD pipeline to automate the deployment process.
|
||||||
|
|
||||||
|
Fastlane assumes mutliple secrets to be present as files in the platform directories. These are:
|
||||||
|
- for android:
|
||||||
|
- `secrets.properties` used by gradle to load secrets needed at execution time
|
||||||
|
- `release.keystore` used by gradle to sign the apk
|
||||||
|
- `google-key.json` used by fastlane to authenticate with the Google Play Store
|
||||||
|
- for ios:
|
||||||
|
- TODO
|
||||||
|
|
||||||
|
These files are stored as secrets in the GitHub repository so that the CI pipeline can access them.
|
Loading…
x
Reference in New Issue
Block a user