Skip to content

Commit

Permalink
merge develop into main (#56)
Browse files Browse the repository at this point in the history
  • Loading branch information
thelukewalton authored Dec 30, 2024
1 parent b16f4cc commit c943ffa
Show file tree
Hide file tree
Showing 175 changed files with 13,314 additions and 11,468 deletions.
2 changes: 1 addition & 1 deletion .github/CODEOWNERS
Original file line number Diff line number Diff line change
@@ -1 +1 @@
* @benken @thelukewalton @mikecoomber #@ps9310
* @benken @thelukewalton @mikecoomber @ps9310
10 changes: 7 additions & 3 deletions .github/workflows/on-main.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: release-please
name: CI - On Main
on:
push:
branches:
Expand All @@ -12,10 +12,10 @@ jobs:
release-please:
runs-on: ubuntu-latest
steps:
- uses: google-github-actions/release-please-action@v4
- uses: googleapis/release-please-action@v4
with:
token: ${{ secrets.PAT }}
config-file: release-please-config.json

code-quality:
runs-on: ubuntu-latest
timeout-minutes: 20
Expand All @@ -24,6 +24,10 @@ jobs:
with:
token: ${{ secrets.PAT }}
- uses: subosito/flutter-action@v2
with:
cache: true
channel: stable
flutter-version: 3.24.x # TODO UX-1347
- name: Setup flutter
run: flutter pub get
- name: Lint and format
Expand Down
15 changes: 11 additions & 4 deletions .github/workflows/on-release.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: "CI - Release"
name: CI - On Release
on:
push:
tags:
Expand All @@ -15,23 +15,30 @@ jobs:
- uses: dart-lang/setup-dart@v1
- name: Install Flutter
uses: subosito/flutter-action@v2
with:
cache: true
channel: stable
flutter-version: 3.24.x # TODO UX-1347
- name: Install dependencies
run: flutter pub get
- name: Format code
run: |
dart format --fix .
dart fix --apply
run: dart format --fix .
# TODO: Package uses pre-release packages, so this always fails.
# - name: Check Publish Warnings
# run: dart pub publish --dry-run
- name: Publish
run: dart pub publish --force

deploy:
name: Deploy the example app on firebase
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: subosito/flutter-action@v2
with:
cache: true
channel: stable
flutter-version: 3.24.x # TODO UX-1347
- name: Setup flutter
run: flutter pub get
- name: Build example app
Expand Down
59 changes: 27 additions & 32 deletions .github/workflows/pull-request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,55 +8,52 @@ concurrency:
cancel-in-progress: true

jobs:
set-env:
name: "Set environment"
runs-on: ubuntu-latest
outputs:
env: ${{ steps.get_env.outputs.env }}
steps:
- uses: actions/checkout@v4
with:
repository: ${{github.event.pull_request.head.repo.full_name}}
ref: ${{ github.head_ref }}
- name: Determine Environment
id: get_env
run: |
codeowners=$(cat .github/CODEOWNERS)
if [[ $(echo "${codeowners[@]}" | fgrep -w "@${{github.actor}}") ]]; then
echo PROWNER
echo "env=pr_owner" >> $GITHUB_OUTPUT
else
echo PR
echo "env=pr" >> $GITHUB_OUTPUT
fi
code-quality:
name: Code quality
runs-on: ubuntu-latest
timeout-minutes: 20
needs: set-env
environment: ${{needs.set-env.outputs.env}}
steps:
- uses: actions/checkout@v4
with:
repository: ${{github.event.pull_request.head.repo.full_name}}
ref: ${{ github.head_ref }}
fetch-depth: 0
- uses: subosito/flutter-action@v2
with:
cache: true

- uses: ZebraDevs/[email protected]
channel: stable
flutter-version: 3.24.x # TODO UX-1347
- uses: ZebraDevs/flutter-code-quality@main
with:
token: ${{secrets.GITHUB_TOKEN}}
run-tests: false
run-coverage: false

check-secret:
runs-on: ubuntu-latest
outputs:
secret-exists: ${{ steps.check.outputs.defined }}
steps:
- name: Check PR can access secrets
id: check
run: |
echo "defined=true" >> $GITHUB_OUTPUT;
if [ "${{ secrets.FIREBASE_SERVICE_ACCOUNT_ZDS_FLUTTER }}" == '' ]; then
echo "defined=false" >> $GITHUB_OUTPUT;
fi
deploy-preview:
name: Deploy preview version of the example app on firebase
needs: code-quality
name: Deploy example app preview on firebase
needs: [code-quality, check-secret]
if: needs.check-secret.outputs.secret-exists == 'true'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
repository: ${{github.event.pull_request.head.repo.full_name}}
ref: ${{ github.head_ref }}
- uses: subosito/flutter-action@v2
with:
cache: true
channel: stable
flutter-version: 3.24.x # TODO UX-1347
- name: Setup flutter
run: flutter pub get
- name: Build example app
Expand All @@ -67,6 +64,4 @@ jobs:
with:
repoToken: "${{ secrets.GITHUB_TOKEN }}"
firebaseServiceAccount: "${{ secrets.FIREBASE_SERVICE_ACCOUNT_ZDS_FLUTTER }}"
expires: 7d
projectId: zds-c9c24
channelId: "pr-${{ github.event.number }}-${{ github.event.pull_request.head.ref }}"
4 changes: 2 additions & 2 deletions .release-please-manifest.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
".": "1.3.1"
}
".": "2.0.0-alpha.7"
}
Loading

0 comments on commit c943ffa

Please sign in to comment.