fix: Navigate to correct drone radar help question (#56) #21
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
name: Delivery | |
# Delivery workflow runs integration, releases a new version and delivers | |
# (deploys) the version build to production environment (app stores) to be | |
# later published, for both iOS and Android platforms | |
env: | |
FLUTTER_VERSION: '3.10.x' | |
DEPLOYMENT_ENV_NAME: production | |
APP_BUNDLE_NAME: cz.dronetag.drone-scanner | |
ANDROID_TARGET_TRACK: internal | |
FLUTTER_BUILD_NUMBER: '10${{ github.run_number }}' | |
on: | |
push: | |
branches: | |
- production | |
- master | |
jobs: | |
integration: | |
name: Run integration | |
uses: ./.github/workflows/integration.yml | |
release-version: | |
name: Release new version | |
needs: integration | |
uses: dronetag/gha-shared/.github/workflows/create-release.yml@master | |
with: | |
must-release: true | |
secrets: | |
github-token: ${{ secrets.GITHUB_TOKEN }} | |
start-deployment: | |
name: Create new GitHub deployment | |
runs-on: ubuntu-latest | |
needs: integration | |
outputs: | |
deployment-id: ${{ steps.start.outputs.deployment_id }} | |
steps: | |
- name: Start a new deployment | |
uses: bobheadxi/deployments@9d4477fdaa4120020cd10ab7e97f68c801422e73 | |
id: start | |
with: | |
step: start | |
token: ${{ secrets.GITHUB_TOKEN }} | |
env: ${{ env.DEPLOYMENT_ENV_NAME }} | |
build-publish-ios: | |
name: Build & publish iOS bundle | |
needs: | |
- release-version | |
- start-deployment | |
runs-on: macos-12 | |
timeout-minutes: 20 | |
env: | |
FLUTTER_BUILD_NAME: ${{ needs.release-version.outputs.version }} | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v3 | |
- name: Install the project | |
uses: dronetag/gha-shared/.github/actions/flutter-install@master | |
with: | |
flutter-version: ${{ env.FLUTTER_VERSION }} | |
- name: Set-up Codemagic CLI Tools | |
run: pip3 install codemagic-cli-tools | |
- name: Obtain iOS signing files | |
uses: dronetag/gha-shared/.github/actions/setup-ios-signing@master | |
with: | |
app-bundle-name: ${{ env.APP_BUNDLE_NAME }} | |
appstore-private-key: ${{ secrets.APP_STORE_CONNECT_PRIVATE_KEY }} | |
appstore-key-id: ${{ secrets.APP_STORE_CONNECT_KEY_IDENTIFIER }} | |
appstore-issuer-id: ${{ secrets.APP_STORE_CONNECT_ISSUER_ID }} | |
certificate-private-key: ${{ secrets.IOS_CERT_PRIVATE_KEY }} | |
- name: Build Flutter iOS app | |
run: > | |
flutter build ipa | |
--release | |
--build-name=$FLUTTER_BUILD_NAME | |
--build-number=$FLUTTER_BUILD_NUMBER | |
--export-options-plist="$HOME/export_options.plist" | |
- name: Upload built bundle as artifacts | |
uses: actions/upload-artifact@v3 | |
with: | |
name: ios-app-bundle | |
path: build/ios/ipa/*.ipa | |
if-no-files-found: error | |
- name: Publish signed bundle to AppStore | |
if: ${{ !contains(github.event.head_commit.message, '[skip publish]') && !contains(github.event.head_commit.message, '[skip ios publish]') }} | |
env: | |
APP_STORE_CONNECT_KEY_IDENTIFIER: ${{ secrets.APP_STORE_CONNECT_KEY_IDENTIFIER }} | |
APP_STORE_CONNECT_ISSUER_ID: ${{ secrets.APP_STORE_CONNECT_ISSUER_ID }} | |
APP_STORE_CONNECT_PRIVATE_KEY: ${{ secrets.APP_STORE_CONNECT_PRIVATE_KEY }} | |
run: app-store-connect publish | |
build-publish-android: | |
name: Build & publish Android bundle | |
needs: | |
- release-version | |
- start-deployment | |
runs-on: ubuntu-22.04 | |
timeout-minutes: 20 | |
env: | |
FLUTTER_BUILD_NAME: ${{ needs.release-version.outputs.version }} | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v3 | |
- name: Install the project | |
uses: dronetag/gha-shared/.github/actions/flutter-install@master | |
with: | |
flutter-version: ${{ env.FLUTTER_VERSION }} | |
setup-java: true | |
- name: Make Android keystore file | |
run: | | |
echo "${{ secrets.ANDROID_KEYSTORE }}" | base64 --decode > ~/toolbox-upload-keystore.jks | |
echo "keyAlias=upload" >> ./android/key.properties | |
echo "storePassword=${{ secrets.ANDROID_KEYSTORE_PASS }}" >> ./android/key.properties | |
echo "keyPassword=${{ secrets.ANDROID_KEYSTORE_PASS }}" >> ./android/key.properties | |
echo "storeFile=$HOME/toolbox-upload-keystore.jks" >> ./android/key.properties | |
- name: Build Flutter Android app | |
run: > | |
flutter build appbundle | |
--release | |
--build-name=$FLUTTER_BUILD_NAME | |
--build-number=$FLUTTER_BUILD_NUMBER | |
- name: Upload built bundle as artifacts | |
uses: actions/upload-artifact@v3 | |
with: | |
name: android-app-bundle | |
path: | | |
build/app/outputs/bundle/*/*.aab | |
build/app/outputs/mapping/release/mapping.txt | |
if-no-files-found: error | |
- name: Publish signed bundle to Google Play | |
uses: r0adkll/upload-google-play@7406d2c7a1db943b737d959bdefdd7f6d9731f99 | |
if: ${{ !contains(github.event.head_commit.message, '[skip publish]') && !contains(github.event.head_commit.message, '[skip android publish]') }} | |
with: | |
serviceAccountJsonPlainText: ${{ secrets.GOOGLE_PLAY_API_KEY_JSON }} | |
packageName: ${{ env.APP_BUNDLE_NAME }} | |
releaseFiles: build/app/outputs/bundle/*/*.aab | |
track: ${{ env.ANDROID_TARGET_TRACK }} | |
mappingFile: build/app/outputs/mapping/release/mapping.txt | |
status: draft | |
# debugSymbols: build/app/intermediates/merged_native_libs/release/out/lib | |
finish-deployment: | |
name: Finish GitHub deployment | |
if: always() | |
runs-on: ubuntu-latest | |
needs: | |
- start-deployment | |
- build-publish-ios | |
- build-publish-android | |
steps: | |
- name: Finish the deployment | |
uses: bobheadxi/deployments@9d4477fdaa4120020cd10ab7e97f68c801422e73 | |
id: deployment | |
with: | |
step: finish | |
deployment_id: ${{ needs.start-deployment.outputs.deployment-id }} | |
token: ${{ secrets.GITHUB_TOKEN }} | |
env: ${{ env.DEPLOYMENT_ENV_NAME }} | |
status: ${{ job.status }} | |
env_url: ${{ inputs.url }} | |
announce: | |
name: Announce to Slack | |
uses: dronetag/gha-shared/.github/workflows/slack-announcement.yml@master | |
needs: | |
- build-publish-ios | |
- build-publish-android | |
with: | |
product-name: ":iphone: Drone Scanner" | |
environment: production | |
availability-text: Builds are available on App Store Connect and Google Play Console | |
secrets: | |
channel-id: ${{ secrets.SLACK_DEPLOYMENTS_CHANNEL_ID }} | |
slack-bot-token: ${{ secrets.SLACK_BOT_TOKEN }} |