diff --git a/.github/workflows/catalog.yaml b/.github/workflows/catalog.yaml index 9c3b104..cb56ca7 100644 --- a/.github/workflows/catalog.yaml +++ b/.github/workflows/catalog.yaml @@ -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 diff --git a/.github/workflows/conferenceapp.yaml b/.github/workflows/conferenceapp.yaml index 0c5fa10..b4963f8 100644 --- a/.github/workflows/conferenceapp.yaml +++ b/.github/workflows/conferenceapp.yaml @@ -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: @@ -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 }} diff --git a/.github/workflows/shared-workflow.yaml b/.github/workflows/shared-workflow.yaml index fdaaa3e..89780e3 100644 --- a/.github/workflows/shared-workflow.yaml +++ b/.github/workflows/shared-workflow.yaml @@ -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: @@ -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 . @@ -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 }} diff --git a/.github/workflows/volunteerapp.yaml b/.github/workflows/volunteerapp.yaml index 3721ad5..65a0465 100644 --- a/.github/workflows/volunteerapp.yaml +++ b/.github/workflows/volunteerapp.yaml @@ -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: @@ -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 }} diff --git a/packages/catalog/lib/main.dart b/packages/catalog/lib/main.dart index beedfc3..6947284 100644 --- a/packages/catalog/lib/main.dart +++ b/packages/catalog/lib/main.dart @@ -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( diff --git a/packages/catalog/pubspec.lock b/packages/catalog/pubspec.lock index d74b896..23a4e35 100644 --- a/packages/catalog/pubspec.lock +++ b/packages/catalog/pubspec.lock @@ -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: diff --git a/packages/cave/pubspec.yaml b/packages/cave/pubspec.yaml index bc38b33..cf6873d 100644 --- a/packages/cave/pubspec.yaml +++ b/packages/cave/pubspec.yaml @@ -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: diff --git a/packages/conferenceapp/pubspec.lock b/packages/conferenceapp/pubspec.lock index 396d877..1696d33 100644 --- a/packages/conferenceapp/pubspec.lock +++ b/packages/conferenceapp/pubspec.lock @@ -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: diff --git a/packages/volunteerapp/pubspec.lock b/packages/volunteerapp/pubspec.lock index c977381..66226eb 100644 --- a/packages/volunteerapp/pubspec.lock +++ b/packages/volunteerapp/pubspec.lock @@ -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: