-
Notifications
You must be signed in to change notification settings - Fork 21
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add workflow files for todoapp, change workflow files in .github
- Loading branch information
Showing
12 changed files
with
922 additions
and
170 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
83 changes: 0 additions & 83 deletions
83
.github/workflows/fastlane_android_custom_build_and_deploy.yaml
This file was deleted.
Oops, something went wrong.
113 changes: 113 additions & 0 deletions
113
.github/workflows/fastlane_build_and_deploy_android_app.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,113 @@ | ||
name: "Custom build and deploy Android app" | ||
|
||
on: | ||
workflow_call: | ||
inputs: | ||
build_name: | ||
type: string | ||
required: true | ||
description: 'The version of the app (example: 1.0.0)' | ||
build_number: | ||
type: string | ||
required: true | ||
description: 'The build number of the app' | ||
project_path: | ||
type: string | ||
default: '.' | ||
required: false | ||
description: 'The location of the flutter project within the repository' | ||
flutter_version: | ||
type: string | ||
default: '' | ||
required: false | ||
description: 'The flutter version used to build the project' | ||
flavor: | ||
type: string | ||
default: 'production' | ||
description: 'The app environment used to build the app' | ||
required: false | ||
publish_to_store: | ||
type: boolean | ||
default: false | ||
description: 'Should the app be published to the Google play store' | ||
required: false | ||
secrets: | ||
credential_encryption_password: | ||
required: true | ||
credential_repository_access_secret: | ||
required: true | ||
|
||
jobs: | ||
build_android: | ||
defaults: | ||
run: | ||
working-directory: ${{ inputs.project_path }} | ||
runs-on: ubuntu-latest | ||
env: | ||
CREDENTIAL_ENCRYPTION_PASSWORD: ${{ secrets.credential_encryption_password }} | ||
CREDENTIAL_REPOSITORY_ACCESS_SECRET: ${{ secrets.credential_repository_access_secret }} | ||
BUNDLE_GEMFILE: ${{ inputs.project_path }}/Gemfile | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: subosito/flutter-action@v2 | ||
with: | ||
flutter-version: ${{ inputs.flutter_version }} | ||
channel: "stable" | ||
- name: Setup Ruby env | ||
uses: ruby/[email protected] | ||
with: | ||
ruby-version: 3.1.0 | ||
bundler-cache: true | ||
- name: Configure Ruby | ||
run: | | ||
bundle install | ||
bundle lock --add-platform ruby | ||
bundle lock --add-platform x86_64-linux | ||
- name: Build and sign Android app | ||
run: | | ||
bundle exec fastlane build_custom platform:android environment:${{ inputs.flavor }} build_name:${{ inputs.build_name }} build_number:${{ inputs.build_number }} | ||
- name: Prepare config | ||
run: mv "${{ inputs.project_path }}/devops/artifacts/deployment.yaml" "${{ inputs.project_path }}/devops/artifacts/android-deployment.yaml" | ||
- name: Upload artifact - .aab | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: app-${{ inputs.flavor }}-release.aab | ||
path: "${{ inputs.project_path }}/devops/artifacts/app-${{ inputs.flavor }}-release.aab" | ||
- name: Upload artifact - deployment config | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: android-deployment.yaml | ||
path: "${{ inputs.project_path }}/devops/artifacts/android-deployment.yaml" | ||
|
||
deploy_to_google_play: | ||
if: ${{ inputs.publish_to_store }} | ||
needs: build_android | ||
defaults: | ||
run: | ||
working-directory: ${{ inputs.project_path }} | ||
runs-on: ubuntu-latest | ||
env: | ||
CREDENTIAL_ENCRYPTION_PASSWORD: ${{ secrets.credential_encryption_password }} | ||
CREDENTIAL_REPOSITORY_ACCESS_SECRET: ${{ secrets.credential_repository_access_secret }} | ||
BUNDLE_GEMFILE: ${{ inputs.project_path }}/Gemfile | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Download artifacts | ||
uses: actions/download-artifact@v4 | ||
with: | ||
path: "${{ inputs.project_path }}/devops/artifacts/" | ||
merge-multiple: true | ||
- name: Rename config | ||
run: mv "${{ inputs.project_path }}/devops/artifacts/android-deployment.yaml" "${{ inputs.project_path }}/devops/artifacts/deployment.yaml" | ||
- name: Setup Ruby env | ||
uses: ruby/[email protected] | ||
with: | ||
ruby-version: 3.1.0 | ||
bundler-cache: true | ||
- name: Configure Ruby | ||
run: | | ||
bundle install | ||
bundle lock --add-platform ruby | ||
bundle lock --add-platform x86_64-linux | ||
- name: Publish to Google Play | ||
run: bundle exec fastlane deploy |
114 changes: 114 additions & 0 deletions
114
.github/workflows/fastlane_build_and_deploy_ios_app.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,114 @@ | ||
name: "Custom build and deploy iOS app" | ||
|
||
on: | ||
workflow_call: | ||
inputs: | ||
build_name: | ||
type: string | ||
required: true | ||
description: 'The version of the app (example: 1.0.0)' | ||
build_number: | ||
type: string | ||
required: true | ||
description: 'The build number of the app' | ||
project_path: | ||
type: string | ||
default: '.' | ||
required: false | ||
description: 'The location of the flutter project within the repository' | ||
flutter_version: | ||
type: string | ||
default: '' | ||
required: false | ||
description: 'The flutter version used to build the project' | ||
flavor: | ||
type: string | ||
default: 'production' | ||
description: 'The app environment used to build the app' | ||
required: false | ||
publish_to_store: | ||
type: boolean | ||
default: false | ||
description: 'Should the app be published to the App store' | ||
required: false | ||
secrets: | ||
credential_encryption_password: | ||
required: true | ||
credential_repository_access_secret: | ||
required: true | ||
|
||
jobs: | ||
build_ios: | ||
defaults: | ||
run: | ||
working-directory: ${{ inputs.project_path }} | ||
runs-on: macos-latest | ||
env: | ||
CREDENTIAL_ENCRYPTION_PASSWORD: ${{ secrets.credential_encryption_password }} | ||
CREDENTIAL_REPOSITORY_ACCESS_SECRET: ${{ secrets.credential_repository_access_secret }} | ||
BUNDLE_GEMFILE: ${{ inputs.project_path }}/Gemfile | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: subosito/flutter-action@v2 | ||
with: | ||
flutter-version: ${{ inputs.flutter_version }} | ||
channel: "stable" | ||
- name: Setup Ruby env | ||
uses: ruby/[email protected] | ||
with: | ||
ruby-version: 3.1.0 | ||
bundler-cache: true | ||
- name: Configure Ruby | ||
run: | | ||
bundle install | ||
bundle lock --add-platform ruby | ||
bundle lock --add-platform x86_64-darwin21 | ||
bundle exec gem install cocoapods | ||
- name: Build and sign iOS app | ||
run: | | ||
bundle exec fastlane build_custom platform:ios environment:${{ inputs.flavor }} build_name:${{ inputs.build_name }} build_number:${{ inputs.build_number }} | ||
- name: Prepare config | ||
run: mv "${{ inputs.project_path }}/devops/artifacts/deployment.yaml" "${{ inputs.project_path }}/devops/artifacts/ios-deployment.yaml" | ||
- name: Upload artifact - .ipa | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: app-${{ inputs.flavor }}-release.ipa | ||
path: "${{ inputs.project_path }}/devops/artifacts/Runner.ipa" | ||
- name: Upload artifact - deployment config | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: ios-deployment.yaml | ||
path: "${{ inputs.project_path }}/devops/artifacts/ios-deployment.yaml" | ||
|
||
deploy_to_test_flight: | ||
if: ${{ inputs.publish_to_store }} | ||
needs: build_ios | ||
defaults: | ||
run: | ||
working-directory: ${{ inputs.project_path }} | ||
runs-on: macos-latest | ||
env: | ||
CREDENTIAL_ENCRYPTION_PASSWORD: ${{ secrets.credential_encryption_password }} | ||
CREDENTIAL_REPOSITORY_ACCESS_SECRET: ${{ secrets.credential_repository_access_secret }} | ||
BUNDLE_GEMFILE: ${{ inputs.project_path }}/Gemfile | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Download artifacts | ||
uses: actions/download-artifact@v4 | ||
with: | ||
path: "${{ inputs.project_path }}/devops/artifacts/" | ||
merge-multiple: true | ||
- name: Rename config | ||
run: mv "${{ inputs.project_path }}/devops/artifacts/ios-deployment.yaml" "${{ inputs.project_path }}/devops/artifacts/deployment.yaml" | ||
- name: Setup Ruby env | ||
uses: ruby/[email protected] | ||
with: | ||
ruby-version: 3.1.0 | ||
bundler-cache: true | ||
- name: Configure Ruby | ||
run: | | ||
bundle install | ||
bundle lock --add-platform ruby | ||
bundle lock --add-platform x86_64-darwin21 | ||
- name: Publish to Test Flight | ||
run: bundle exec fastlane deploy |
Oops, something went wrong.