Skip to content

Instantly share code, notes, and snippets.

@febritecno
Last active December 14, 2022 10:48
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save febritecno/ac9bfd99656c3958d21785a7d5c7f0c3 to your computer and use it in GitHub Desktop.
Save febritecno/ac9bfd99656c3958d21785a7d5c7f0c3 to your computer and use it in GitHub Desktop.
Get auto responsive size without size / screenutil
name: Build Flutter APKs & Appbundle
on: push
jobs:
# Build APKs
build_apks:
name: Build APKs
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Set up JDK 12
uses: actions/setup-java@v2
with:
distribution: 'adopt'
java-version: '12.x'
- name: Initialize project version
id: project_version
uses: its404/get-flutter-version@v1.0.0
- name: Install Flutter SDK
uses: subosito/flutter-action@v1
with:
channel: 'stable'
- name: Building APKs (Split by ABI)
run: flutter build apk --release --split-per-abi
- name: Release the APKs
uses: ncipollo/release-action@v1
with:
artifacts: "build/app/outputs/flutter-apk/*.apk"
token: ${{ secrets.GITHUB_TOKEN }}
tag: v${{ steps.project_version.outputs.version_number }}-${{github.run_number}}-apks
name: "Built Apks ${{ steps.project_version.outputs.version_number }} Build(${{github.run_number}})"
# Build Appbundle
build_appbundle:
name: Build APPBUNDLE
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Set up JDK 12
uses: actions/setup-java@v2
with:
distribution: 'adopt'
java-version: '12.x'
- name: Get project version
id: project_version
uses: its404/get-flutter-version@v1.0.0
- name: Install Flutter
uses: subosito/flutter-action@v1
with:
channel: 'stable'
- name: Building Appbundle
run: flutter build appbundle
- name: Release Appbundle
uses: ncipollo/release-action@v1
with:
artifacts: "build/app/outputs/bundle/release/*.aab"
token: ${{ secrets.GITHUB_TOKEN }}
tag: v${{ steps.project_version.outputs.version_number }}-${{github.run_number}}-appbundle
name: "Built Appbundle ${{ steps.project_version.outputs.version_number }} Build(${{github.run_number}})"
// https://pub.dev/packages/responsive_framework
// add to main.dart
MaterialApp
builder: (context, child) => ResponsiveWrapper.builder(
child,
maxWidth: 1000,
minWidth: 450,
defaultScale: true,
breakpoints: const [
ResponsiveBreakpoint.resize(450, name: MOBILE),
ResponsiveBreakpoint.autoScale(800, name: TABLET),
ResponsiveBreakpoint.resize(1000, name: DESKTOP),
],
)
@febritecno
Copy link
Author

how to pull fresh new branch from remote
git checkout -b development remotes/origin/development

@febritecno
Copy link
Author

febritecno commented Dec 14, 2022

how to set up project from selected branch (not branch main!)

  1. download as zip branch dev from repo (not default branch)
  2. git init
  3. git checkout -b dev
  4. git remote add origin https://github.com/repo.git
  5. git add . && git commit -m "message"
  6. git pull origin dev --rebase (fix no history commit)

don't clone, checkout new branch and pull from source dev directly ( nanti data yg di main akan kecampur dengan branch dev. karna headnya beda!!)

ketika kita pindah branch tanpa commit ke branch lain akan dianggap merge data (data branch lain akan ikut)
kalau data clone awal dari branch main pindah ke branch lain akan campur aduk!!

how to pull new branch from remote

git checkout -b development remotes/origin/development

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment