Skip to content

fix: add missing google maps api request headers for mobile ds-11 (#28) #20

fix: add missing google maps api request headers for mobile ds-11 (#28)

fix: add missing google maps api request headers for mobile ds-11 (#28) #20

Workflow file for this run

name: Continuous Delivery
on:
push:
branches:
- main
workflow_dispatch:
concurrency:
group: ${{ github.ref_name }}
cancel-in-progress: false
jobs:
release:
name: 🚀 Release
runs-on: ubuntu-latest
permissions:
contents: write
pull-requests: write
outputs:
release_created: ${{ steps.rp.outputs.release_created }}
created_tag: ${{ steps.rp.outputs.tag_name }}
steps:
- name: 📚 Code Checkout
uses: actions/checkout@v4
- name: 🚀 Release
id: rp
uses: googleapis/release-please-action@v4
with:
manifest-file: release.manifest.json
config-file: release.config.json
include-component-in-tag: false
dependencies:
name: 📦 Setup Dependencies For Deployment
needs: release
if: ${{ needs.release.outputs.release_created }}
runs-on: macos-latest
env:
JDK_VERSION: 17
JDK_DISTRIBUTION: microsoft
outputs:
release-tag: ${{ needs.release.outputs.created_tag }}
fl-cache-key: ${{ steps.fl-setup.outputs.CACHE-KEY }}
fl-pub-cache-key: ${{ steps.fl-setup.outputs.PUB-CACHE-KEY }}
jdk-version: ${{ steps.jdk.outputs.version }}
jdk-distro: ${{ env.JDK_DISTRIBUTION }}
steps:
- name: 📚 Code Checkout
uses: actions/checkout@v4
- name: 🐦 Setup Flutter SDK
id: fl-setup
uses: subosito/flutter-action@v2
with:
flutter-version-file: ./pubspec.yaml
channel: stable
cache: true
cache-key: |
fl-:channel:-v:version:-:os:-:arch:-cd-${{ hashFiles('./pubspec.lock') }}
pub-cache-key: |
fl-pub-:channel:-v:version:-:os:-:arch:-cd-${{ hashFiles('./pubspec.lock') }}
- name: ☕ Setup JDK v${{ env.JDK_VERSION }}
id: jdk
uses: actions/setup-java@v4
with:
java-version: ${{ env.JDK_VERSION }}
distribution: ${{ env.JDK_DISTRIBUTION }}
cache: "gradle"
cache-dependency-path: |
android/*.gradle*
android/**/gradle-wrapper.properties
- name: 🔍 flutter doctor
run: flutter doctor -v
- name: 📦 Get dependencies
run: flutter pub get
web-github-pages:
name: 🚀 Web Deploy on Github Pages
needs: dependencies
runs-on: macos-latest
permissions:
contents: write
steps:
- name: 📚 Code Checkout
uses: actions/checkout@v4
- name: 📦 Restore Dependencies
uses: subosito/flutter-action@v2
with:
flutter-version-file: ./pubspec.yaml
channel: stable
cache: true
cache-key: ${{needs.dependencies.outputs.fl-cache-key}}
pub-cache-key: ${{needs.dependencies.outputs.fl-pub-cache-key}}
- name: 🏗️ Build code utils
run: |
dart run build_runner build -d
flutter gen-l10n
- name: 🏗️ Generate build number
id: build-number
uses: onyxmueller/build-tag-number@v1
with:
token: ${{ secrets.GITHUB_TOKEN }}
prefix: "web--github-pages--"
- name: 🏗️ Build web release
env:
BASE_HREF: "/dicoding_story_fl/"
BUILD_NUMBER: ${{ steps.build-number.outputs.build_number }}
WEB_RENDERER: canvaskit
run: |
flutter build web --release --base-href ${{ env.BASE_HREF }} --build-number ${{ env.BUILD_NUMBER }} --build-number ${{ env.BUILD_NUMBER }} --web-renderer ${{ env.WEB_RENDERER }}
- name: 🚀 Deploy to Github Pages
uses: peaceiris/actions-gh-pages@v3
env:
RELEASE_TAG: ${{ needs.dependencies.outputs.release-tag }}
BUILD_NUMBER: ${{ steps.build-number.outputs.build_number }}
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./build/web
publish_branch: web-release
commit_message:
"${{ env.RELEASE_TAG }}+${{ env.BUILD_NUMBER }} web release"
apk-github-release:
name: 🚀 Apk Release on Github Release
needs: dependencies
runs-on: macos-latest
permissions:
contents: write
steps:
- name: 📚 Code Checkout
uses: actions/checkout@v4
- name: 📦 Restore Dependencies
uses: subosito/flutter-action@v2
with:
flutter-version-file: ./pubspec.yaml
channel: stable
cache: true
cache-key: ${{needs.dependencies.outputs.fl-cache-key}}
pub-cache-key: ${{needs.dependencies.outputs.fl-pub-cache-key}}
- name: ☕ Setup JDK v${{ needs.dependencies.outputs.jdk-version }}
id: jdk
uses: actions/setup-java@v4
with:
java-version: ${{ needs.dependencies.outputs.jdk-version }}
distribution: ${{ needs.dependencies.outputs.jdk-distro }}
cache: "gradle"
cache-dependency-path: |
android/*.gradle*
android/**/gradle-wrapper.properties
- name: 📝 Accept Android licenses
run: "yes | flutter doctor --android-licenses"
- name: 🏗️ Build code utils
run: |
dart run build_runner build -d
flutter gen-l10n
mkdir secrets
echo "${{ secrets.ANDROID_RELEASE_KEY_BASE64 }}" | base64 --decode > secrets/android-release-key.jks
echo "${{ secrets.ANDROID_KEY_PROPS_BASE64 }}" | base64 --decode > android/key.properties
- name: 🏗️ Generate build number
id: build-number
uses: onyxmueller/build-tag-number@v1
with:
token: ${{ secrets.GITHUB_TOKEN }}
prefix: "apk--github-release--"
- name: 🏗️ Build APK release
env:
BUILD_NUMBER: ${{ steps.build-number.outputs.build_number }}
run: |
flutter build apk --release --build-number ${{ env.BUILD_NUMBER }}
- name: 🚀 Publish to Github Release
uses: softprops/action-gh-release@v2
env:
RELEASE_TAG: ${{ needs.dependencies.outputs.release-tag }}
BUILD_NUMBER: ${{ steps.build-number.outputs.build_number }}
with:
name: "${{ env.RELEASE_TAG }}+${{ env.BUILD_NUMBER }} APK Release"
tag_name: "${{ env.RELEASE_TAG }}+${{ env.BUILD_NUMBER }}--apk-build"
generate_release_notes: true
files: |
build/app/outputs/flutter-apk/app-release.apk
CHANGELOG.md
LICENSE