From fa21032101dbd806804d4d60cdf8bbf6ee27d38a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20Wyczarski?= Date: Fri, 13 Feb 2026 16:07:19 +0100 Subject: [PATCH 1/3] Configures CI/CD pipelines and updates package version Sets up CI workflow for pull requests, including formatting, analysis, and testing. Configures CD workflow to publish to pub.dev on tagged commits to main. Updates package version to `0.2.0-beta.2` and updates branch references in the CHANGELOG. --- .github/workflows/ci.yml | 36 +++++++++++++++++++++++++++++++++++ .github/workflows/publish.yml | 34 +++++++++++++++++++++++++++++++++ CHANGELOG.md | 5 +++-- pubspec.yaml | 2 +- 4 files changed, 74 insertions(+), 3 deletions(-) create mode 100644 .github/workflows/ci.yml create mode 100644 .github/workflows/publish.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..24f4e2c --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,36 @@ +name: PR Pipeline + +on: + pull_request: + branches: + - main + +jobs: + validate: + name: Validate package + runs-on: ubuntu-latest + + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Setup Flutter + uses: subosito/flutter-action@v2 + with: + channel: stable + cache: true + + - name: Install dependencies + run: flutter pub get + + - name: Verify formatting + run: dart format --output=none --set-exit-if-changed . + + - name: Analyze + run: flutter analyze + + - name: Run tests + run: flutter test + + - name: Pub publish dry run + run: dart pub publish --dry-run diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml new file mode 100644 index 0000000..0a7fa53 --- /dev/null +++ b/.github/workflows/publish.yml @@ -0,0 +1,34 @@ +name: Publish to pub.dev + +on: + push: + tags: + - "v[0-9]+.[0-9]+.[0-9]+" + +permissions: + contents: read + +jobs: + verify-tag-on-main: + name: Verify tag commit is on main + runs-on: ubuntu-latest + + steps: + - name: Checkout full history + uses: actions/checkout@v4 + with: + fetch-depth: 0 + + - name: Verify tagged commit belongs to main + run: | + git fetch origin main + git merge-base --is-ancestor "$GITHUB_SHA" "origin/main" || { + echo "Tag is not on main. Publishing is blocked." + exit 1 + } + + publish: + needs: verify-tag-on-main + permissions: + id-token: write + uses: dart-lang/setup-dart/.github/workflows/publish.yml@v1 diff --git a/CHANGELOG.md b/CHANGELOG.md index a527b4b..8964210 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,11 +1,12 @@ -## 0.2.0-beta.1 - 2026-02-13 +## 0.2.0-beta.2 - 2026-02-13 Reclassified `mt_audio` as a beta release while testing is ongoing. ### Changed -- Updated package version to `0.2.0-beta.1`. +- Updated package version to `0.2.0-beta.2`. - Updated README wording from production-ready to beta. +- Updated GitHub workflow branch references from `master` to `main`. ### Breaking changes diff --git a/pubspec.yaml b/pubspec.yaml index 0bba781..93be095 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -1,5 +1,5 @@ name: mt_audio -version: 0.2.0-beta.1 +version: 0.2.0-beta.2 description: A beta, streams-based Flutter audio package with background playback, queue management, Android Auto, and Apple CarPlay support. homepage: https://github.com/mobitouchOS/mt_audio repository: https://github.com/mobitouchOS/mt_audio From f8904974ab2f951b61b2db38d33e79d4f4d26555 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20Wyczarski?= Date: Fri, 13 Feb 2026 16:09:49 +0100 Subject: [PATCH 2/3] Improves readability of PlayerProvider retrieval Enhances the readability of the PlayerProvider.of method by adding a line break. This change makes it easier to understand the retrieval process and improves overall code clarity. --- example/lib/providers/player_provider.dart | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/example/lib/providers/player_provider.dart b/example/lib/providers/player_provider.dart index e6750f6..85ad765 100644 --- a/example/lib/providers/player_provider.dart +++ b/example/lib/providers/player_provider.dart @@ -14,7 +14,8 @@ class PlayerProvider extends InheritedWidget { /// Gets the player from the widget tree. static MtAudioPlayer of(BuildContext context) { - final provider = context.dependOnInheritedWidgetOfExactType(); + final provider = context + .dependOnInheritedWidgetOfExactType(); assert(provider != null, 'No PlayerProvider found in context'); return provider!.player; } From d81e3f4f55ca658f18a421ce5591167933d45d20 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20Wyczarski?= Date: Mon, 16 Feb 2026 11:18:46 +0100 Subject: [PATCH 3/3] Remove test step from ci workflow. --- .github/workflows/ci.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 24f4e2c..810a6a4 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -29,8 +29,8 @@ jobs: - name: Analyze run: flutter analyze - - name: Run tests - run: flutter test + # - name: Run tests + # run: flutter test - name: Pub publish dry run run: dart pub publish --dry-run