Skip to content

Commit

Permalink
Merge pull request #11 from GDG-W/fix-catalog
Browse files Browse the repository at this point in the history
Fix catalog
  • Loading branch information
Mastersam07 authored Sep 23, 2024
2 parents 6d109e6 + 0646797 commit 33db758
Show file tree
Hide file tree
Showing 9 changed files with 210 additions and 62 deletions.
11 changes: 8 additions & 3 deletions .github/workflows/catalog.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,14 @@ jobs:
packages/catalog/.dart_tool
key: ${{ runner.os }}-pub-${{ hashFiles('packages/catalog/pubspec.yaml') }}

- name: Install dependencies
run: flutter pub get
working-directory: packages/catalog
- name: Enable melos
run: dart pub global activate melos

- name: Get packages
run: melos bootstrap

- name: Generate Files
run: melos generate

- name: Build Web
run: flutter build web
Expand Down
24 changes: 16 additions & 8 deletions .github/workflows/conferenceapp.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,12 @@ on:
changelog:
description: 'Changelog for this release'
required: true
build-version:
description: 'Version number for the release'
required: true
build-number:
description: 'Build number for the release'
required: true

jobs:
check-formatting:
Expand All @@ -26,14 +32,16 @@ jobs:
package-name: conferenceapp
android-build: true
changelog: ${{ github.event.inputs.changelog }}
build-number: ${{ github.event.inputs.build-number }}
build-version: ${{ github.event.inputs.build-version }}
secrets:
FIREBASE_TOKEN: ${{ secrets.FIREBASE_TOKEN }}
CREDENTIAL_FILE_CONTENT: ${{ secrets.CREDENTIAL_FILE_CONTENT }}
FIREBASE_APP_ID: ${{ secrets.FIREBASE_APP_ID }}

ios-build:
if: github.event_name == 'workflow_dispatch'
uses: ./.github/workflows/shared-workflow.yaml
with:
package-name: conferenceapp
ios-build: true
changelog: ${{ github.event.inputs.changelog }}
# ios-build:
# if: github.event_name == 'workflow_dispatch'
# uses: ./.github/workflows/shared-workflow.yaml
# with:
# package-name: conferenceapp
# ios-build: true
# changelog: ${{ github.event.inputs.changelog }}
185 changes: 149 additions & 36 deletions .github/workflows/shared-workflow.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,31 @@ on:
description: 'Changelog for the release'
required: false
type: string
build-version:
description: 'Version number for the release'
required: false
default: '1.0.0'
type: string
build-number:
description: 'Build number for the release'
required: false
default: '1'
type: string
secrets:
FIREBASE_TOKEN:
CREDENTIAL_FILE_CONTENT:
required: false
FIREBASE_APP_ID:
required: false
# APP_STORE_CONNECT_ISSUER_ID:
# required: false
# APP_STORE_CONNECT_KEY_IDENTIFIER:
# required: false
# APP_STORE_CONNECT_PRIVATE_KEY:
# required: false
# CERTIFICATE_PRIVATE_KEY:
# required: false
# SSH_PRIVATE_KEY:
# required: false

jobs:
check-formatting:
Expand All @@ -39,17 +59,24 @@ jobs:
with:
flutter-version: '3.24.3'

- name: Cache dependencies
uses: actions/cache@v3
- name: Cache Flutter dependencies
uses: actions/cache@v4
with:
path: |
~/.pub-cache
packages/${{ inputs['package-name'] }}/.dart_tool
key: ${{ runner.os }}-pub-${{ hashFiles('packages/${{ inputs["package-name"] }}/pubspec.yaml') }}
restore-keys: |
${{ runner.os }}-pub-
- name: Enable melos
run: dart pub global activate melos

- name: Install dependencies
run: flutter pub get
working-directory: packages/${{ inputs['package-name'] }}
- name: Get packages
run: melos bootstrap

- name: Generate Files
run: melos generate

- name: Check formatting
run: dart format --set-exit-if-changed .
Expand All @@ -65,51 +92,137 @@ jobs:
steps:
- name: Checkout repository
uses: actions/checkout@v3

- name: Setup Java 17
uses: actions/setup-java@v2
with:
java-version: '17'
distribution: 'temurin'

- name: Cache Flutter dependencies
uses: actions/cache@v4
with:
path: |
~/.pub-cache
packages/${{ inputs['package-name'] }}/.dart_tool
key: ${{ runner.os }}-pub-${{ hashFiles('packages/${{ inputs["package-name"] }}/pubspec.yaml') }}
restore-keys: |
${{ runner.os }}-pub-
- name: Cache Gradle dependencies
uses: actions/cache@v3
with:
path: |
~/.gradle/caches
~/.gradle/wrapper
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }}
restore-keys: |
${{ runner.os }}-gradle-
- name: Set up Flutter
uses: subosito/flutter-action@v2
with:
flutter-version: '3.24.3'

- name: Enable melos
run: dart pub global activate melos

- name: Install dependencies
run: flutter pub get
working-directory: packages/${{ inputs['package-name'] }}
- name: Get packages
run: melos bootstrap

- name: Generate Files
run: melos generate

- name: Build Android
run: flutter build apk --release
run: flutter build apk --release --build-name=${{ inputs.build-version }} --build-number=${{ inputs.build-number }}
working-directory: packages/${{ inputs['package-name'] }}

- name: Deploy Android to Firebase
uses: wzieba/Firebase-Distribution-Github-Action@v1
with:
appId: ${{ secrets.FIREBASE_APP_ID }}
token: ${{ secrets.FIREBASE_TOKEN }}
serviceCredentialsFileContent: ${{ secrets.CREDENTIAL_FILE_CONTENT }}
groups: testers
file: packages/${{ inputs['package-name'] }}/build/app/outputs/flutter-apk/app-release.apk
releaseNotes: ${{ inputs.changelog }}

ios-build:
if: inputs.ios-build == 'true'
runs-on: macos-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3

- name: Set up Flutter
uses: subosito/flutter-action@v2
with:
flutter-version: '3.24.3'

- name: Install dependencies
run: flutter pub get
working-directory: packages/${{ inputs['package-name'] }}

- name: Build iOS
run: flutter build ios --release
working-directory: packages/${{ inputs['package-name'] }}

- name: Deploy iOS to TestFlight
uses: actions/upload-artifact@v3
with:
path: packages/${{ inputs['package-name'] }}/build/ios/ipa/*.ipa
releaseNotes: ${{ inputs.changelog }}
# ios-build:
# if: inputs.ios-build == 'true'
# runs-on: macos-latest
# steps:
# - name: Checkout repository
# uses: actions/checkout@v3

# - name: Cache CocoaPods dependencies
# uses: actions/cache@v3
# with:
# path: |
# ~/.cocoapods
# ios/Pods
# key: ${{ runner.os }}-pods-${{ hashFiles('**/Podfile.lock') }}
# restore-keys: |
# ${{ runner.os }}-pods-

# - name: Cache Flutter dependencies
# uses: actions/cache@v3
# with:
# path: |
# ~/.pub-cache
# packages/${{ inputs['package-name'] }}/.dart_tool
# key: ${{ runner.os }}-pub-${{ hashFiles('packages/${{ inputs["package-name"] }}/pubspec.yaml') }}
# restore-keys: |
# ${{ runner.os }}-pub-

# - name: Set up Flutter
# uses: subosito/flutter-action@v2
# with:
# flutter-version: '3.24.3'

# - name: Enable melos
# run: dart pub global activate melos

# - name: Get packages
# run: melos bootstrap

# - name: Generate Files
# run: melos generate

# - name: Install dependencies
# run: flutter pub get
# working-directory: packages/${{ inputs['package-name'] }}

# - name: Install Codemagic CLI tools
# run: pip install codemagic-cli-tools
# working-directory: packages/${{ inputs['package-name'] }}

# - name: Set up keychain
# run: keychain initialize
# working-directory: packages/${{ inputs['package-name'] }}

# - name: Fetch signing files from App Store Connect
# run: |
# app-store-connect fetch-signing-files $(xcode-project detect-bundle-id) \
# --type IOS_APP_STORE \
# --create
# working-directory: packages/${{ inputs['package-name'] }}

# - name: Set up signing certificate in keychain
# run: keychain add-certificates
# working-directory: packages/${{ inputs['package-name'] }}

# - name: Set up code signing in Xcode project
# run: xcode-project use-profiles
# working-directory: packages/${{ inputs['package-name'] }}

# - name: Build iOS
# run: flutter build ipa --export-options-plist=$HOME/export_options.plist --build-name=${{ inputs.build-version }} --build-number=${{ inputs.build-number }}
# working-directory: packages/${{ inputs['package-name'] }}

# - name: Deploy iOS to Firebase
# uses: wzieba/Firebase-Distribution-Github-Action@v1
# with:
# appId: ${{ secrets.FIREBASE_APP_ID }}
# serviceCredentialsFileContent: ${{ secrets.CREDENTIAL_FILE_CONTENT }}
# groups: testers
# file: packages/${{ inputs['package-name'] }}/build/ios/ipa/*.ipa
# releaseNotes: ${{ inputs.changelog }}
24 changes: 16 additions & 8 deletions .github/workflows/volunteerapp.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,12 @@ on:
changelog:
description: 'Changelog for this release'
required: true
build-version:
description: 'Version number for the release'
required: true
build-number:
description: 'Build number for the release'
required: true

jobs:
check-formatting:
Expand All @@ -26,14 +32,16 @@ jobs:
package-name: volunteerapp
android-build: true
changelog: ${{ github.event.inputs.changelog }}
build-number: ${{ github.event.inputs.build-number }}
build-version: ${{ github.event.inputs.build-version }}
secrets:
FIREBASE_TOKEN: ${{ secrets.FIREBASE_TOKEN }}
CREDENTIAL_FILE_CONTENT: ${{ secrets.CREDENTIAL_FILE_CONTENT }}
FIREBASE_APP_ID: ${{ secrets.FIREBASE_APP_ID }}

ios-build:
if: github.event_name == 'workflow_dispatch'
uses: ./.github/workflows/shared-workflow.yaml
with:
package-name: volunteerapp
ios-build: true
changelog: ${{ github.event.inputs.changelog }}
# ios-build:
# if: github.event_name == 'workflow_dispatch'
# uses: ./.github/workflows/shared-workflow.yaml
# with:
# package-name: volunteerapp
# ios-build: true
# changelog: ${{ github.event.inputs.changelog }}
14 changes: 14 additions & 0 deletions packages/catalog/lib/main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,20 @@ class WidgetbookApp extends StatelessWidget {
return Widgetbook.material(
directories: directories,
addons: [
BuilderAddon(
name: 'ScreenUtil',
builder: (context, child) {
return ScreenUtilInit(
designSize: const Size(430, 956),
minTextAdapt: true,
splitScreenMode: true,
// This is needed to use the workbench [MediaQuery]
useInheritedMediaQuery: true,
builder: (context, child) => child!,
child: child,
);
},
),
DeviceFrameAddon(
devices: [
DeviceInfo.genericPhone(
Expand Down
4 changes: 2 additions & 2 deletions packages/catalog/pubspec.lock
Original file line number Diff line number Diff line change
Expand Up @@ -270,10 +270,10 @@ packages:
dependency: transitive
description:
name: flutter_screenutil
sha256: "8239210dd68bee6b0577aa4a090890342d04a136ce1c81f98ee513fc0ce891de"
sha256: b372c35a772a1dc84142a3b9c5ee89a390834bd258e5e6a450d9b975b985d1c9
url: "https://pub.dev"
source: hosted
version: "5.9.3"
version: "5.9.1"
flutter_shaders:
dependency: transitive
description:
Expand Down
2 changes: 1 addition & 1 deletion packages/cave/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ dependencies:
flutter:
sdk: flutter
flutter_animate: ^4.5.0
flutter_screenutil: ^5.9.3
flutter_screenutil: 5.9.1
flutter_svg: ^2.0.10+1

dev_dependencies:
Expand Down
4 changes: 2 additions & 2 deletions packages/conferenceapp/pubspec.lock
Original file line number Diff line number Diff line change
Expand Up @@ -177,10 +177,10 @@ packages:
dependency: transitive
description:
name: flutter_screenutil
sha256: "8239210dd68bee6b0577aa4a090890342d04a136ce1c81f98ee513fc0ce891de"
sha256: b372c35a772a1dc84142a3b9c5ee89a390834bd258e5e6a450d9b975b985d1c9
url: "https://pub.dev"
source: hosted
version: "5.9.3"
version: "5.9.1"
flutter_shaders:
dependency: transitive
description:
Expand Down
4 changes: 2 additions & 2 deletions packages/volunteerapp/pubspec.lock
Original file line number Diff line number Diff line change
Expand Up @@ -161,10 +161,10 @@ packages:
dependency: transitive
description:
name: flutter_screenutil
sha256: "8239210dd68bee6b0577aa4a090890342d04a136ce1c81f98ee513fc0ce891de"
sha256: b372c35a772a1dc84142a3b9c5ee89a390834bd258e5e6a450d9b975b985d1c9
url: "https://pub.dev"
source: hosted
version: "5.9.3"
version: "5.9.1"
flutter_shaders:
dependency: transitive
description:
Expand Down

0 comments on commit 33db758

Please sign in to comment.