diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS new file mode 100644 index 0000000..438efa0 --- /dev/null +++ b/.github/CODEOWNERS @@ -0,0 +1 @@ +@n-bernat diff --git a/.github/workflows/flutter_tests_beta.yaml b/.github/workflows/flutter_tests_beta.yaml new file mode 100644 index 0000000..a2aa784 --- /dev/null +++ b/.github/workflows/flutter_tests_beta.yaml @@ -0,0 +1,36 @@ +# flutter_tests_*.yaml actions are duplicated, because GitHub doesn't support badges for matrix builds. +name: app_preferences - Tests (beta) +on: + workflow_dispatch: + pull_request: + push: + branches: + - master + schedule: + - cron: "0 0 * * 0" + +jobs: + build: + timeout-minutes: 5 + name: Flutter tests + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Install Flutter + uses: subosito/flutter-action@v2 + with: + channel: "beta" + + - name: Print version + run: flutter --version + + - name: Get dependencies + run: flutter pub get + + - name: Check formatting + run: dart format . --set-exit-if-changed + + - name: Run analyzer + run: flutter analyze diff --git a/.github/workflows/flutter_tests_min.yaml b/.github/workflows/flutter_tests_min.yaml new file mode 100644 index 0000000..0d43d3f --- /dev/null +++ b/.github/workflows/flutter_tests_min.yaml @@ -0,0 +1,38 @@ +# flutter_tests_*.yaml actions are duplicated, because GitHub doesn't support badges for matrix builds. +name: app_preferences - Tests (3.24.0) +on: + workflow_dispatch: + pull_request: + push: + branches: + - master + schedule: + - cron: "0 0 * * 0" + +jobs: + build: + timeout-minutes: 5 + name: Flutter tests + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Install Flutter + uses: subosito/flutter-action@v2 + with: + cache: true + flutter-version: "3.22.0" + channel: "stable" + + - name: Print version + run: flutter --version + + - name: Get dependencies + run: flutter pub get + + - name: Check formatting + run: dart format . --set-exit-if-changed + + - name: Run analyzer + run: flutter analyze diff --git a/.github/workflows/flutter_tests_stable.yaml b/.github/workflows/flutter_tests_stable.yaml new file mode 100644 index 0000000..2b9ce79 --- /dev/null +++ b/.github/workflows/flutter_tests_stable.yaml @@ -0,0 +1,37 @@ +# flutter_tests_*.yaml actions are duplicated, because GitHub doesn't support badges for matrix builds. +name: app_preferences - Tests (stable) +on: + workflow_dispatch: + pull_request: + push: + branches: + - master + schedule: + - cron: "0 0 * * 0" + +jobs: + build: + timeout-minutes: 5 + name: Flutter tests + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Install Flutter + uses: subosito/flutter-action@v2 + with: + cache: true + channel: "stable" + + - name: Print version + run: flutter --version + + - name: Get dependencies + run: flutter pub get + + - name: Check formatting + run: dart format . --set-exit-if-changed + + - name: Run analyzer + run: flutter analyze diff --git a/.github/workflows/publish.yaml b/.github/workflows/publish.yaml new file mode 100644 index 0000000..ac26099 --- /dev/null +++ b/.github/workflows/publish.yaml @@ -0,0 +1,30 @@ +name: Publish to pub.dev +on: + push: + tags: + - "v[0-9]+.[0-9]+.[0-9]+*" + +jobs: + publish: + name: Publish to pub.dev + runs-on: ubuntu-latest + + permissions: + id-token: write + + steps: + - name: Clone repository + uses: actions/checkout@v3 + + - name: Install Dart + uses: dart-lang/setup-dart@v1 + with: + sdk: stable + + - name: Install Flutter + uses: subosito/flutter-action@v2 + with: + channel: "stable" + + - name: Publish to pub.dev + run: flutter pub publish --force