From 159b83b15d8b3f276309bb8b9848fff9bb0f7d47 Mon Sep 17 00:00:00 2001 From: KickNext Date: Sun, 16 Aug 2026 00:31:39 +0500 Subject: [PATCH 1/2] Automate repository delivery and maintenance --- .github/CODEOWNERS | 1 + .github/dependabot.yml | 21 +++++++++ .github/pull_request_template.md | 7 +++ .github/workflows/ci.yml | 10 +++-- .github/workflows/pages.yml | 66 +++++++++++++++++++++++++++ .github/workflows/publish.yml | 76 ++++++++++++++++++++++++++++++++ README.md | 5 +++ 7 files changed, 182 insertions(+), 4 deletions(-) create mode 100644 .github/CODEOWNERS create mode 100644 .github/dependabot.yml create mode 100644 .github/pull_request_template.md create mode 100644 .github/workflows/pages.yml create mode 100644 .github/workflows/publish.yml diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS new file mode 100644 index 0000000..a7f64b8 --- /dev/null +++ b/.github/CODEOWNERS @@ -0,0 +1 @@ +* @KickNext diff --git a/.github/dependabot.yml b/.github/dependabot.yml new file mode 100644 index 0000000..7759eb7 --- /dev/null +++ b/.github/dependabot.yml @@ -0,0 +1,21 @@ +version: 2 +updates: + - package-ecosystem: github-actions + directory: / + schedule: + interval: weekly + day: monday + groups: + actions: + patterns: ["*"] + + - package-ecosystem: pub + directories: + - / + - /example + schedule: + interval: weekly + day: monday + groups: + pub-dependencies: + patterns: ["*"] diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md new file mode 100644 index 0000000..2521b62 --- /dev/null +++ b/.github/pull_request_template.md @@ -0,0 +1,7 @@ +## What changed + + + +## Verification + + diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index d6091f1..23f07be 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -18,10 +18,12 @@ jobs: steps: - name: Check out source - uses: actions/checkout@v6 + uses: actions/checkout@d23441a48e516b6c34aea4fa41551a30e30af803 # v6 + with: + persist-credentials: false - name: Set up Flutter - uses: subosito/flutter-action@v2 + uses: subosito/flutter-action@1a449444c387b1966244ae4d4f8c696479add0b2 # v2 with: channel: stable cache: true @@ -66,7 +68,7 @@ jobs: - name: Install Chrome id: chrome - uses: browser-actions/setup-chrome@v2 + uses: browser-actions/setup-chrome@086160e580d6e8c142ad5ba29009dcde677c6321 # v2 - name: Run browser smoke test run: flutter test --platform chrome test/web_smoke_test.dart @@ -86,7 +88,7 @@ jobs: - name: Upload failure diagnostics if: failure() - uses: actions/upload-artifact@v6 + uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f # v6 with: name: morphnext-failure-${{ github.run_attempt }} path: | diff --git a/.github/workflows/pages.yml b/.github/workflows/pages.yml new file mode 100644 index 0000000..fe92ca0 --- /dev/null +++ b/.github/workflows/pages.yml @@ -0,0 +1,66 @@ +name: Web demo + +on: + push: + branches: [main] + workflow_dispatch: + +concurrency: + group: pages + cancel-in-progress: false + +permissions: + contents: read + +jobs: + build: + runs-on: ubuntu-latest + timeout-minutes: 20 + + steps: + - name: Check out source + uses: actions/checkout@d23441a48e516b6c34aea4fa41551a30e30af803 # v6 + with: + persist-credentials: false + + - name: Set up Flutter + uses: subosito/flutter-action@1a449444c387b1966244ae4d4f8c696479add0b2 # v2 + with: + channel: stable + cache: true + pub-cache: true + + - name: Install dependencies + run: flutter pub get + working-directory: example + + - name: Build web demo + run: flutter build web --release --base-href /morphnext/ + working-directory: example + + - name: Add SPA fallback + run: cp example/build/web/index.html example/build/web/404.html + + - name: Configure Pages + uses: actions/configure-pages@983d7736d9b0ae728b81ab479565c72886d7745b # v5 + + - name: Upload Pages artifact + uses: actions/upload-pages-artifact@7b1f4a764d45c48632c6b24a0339c27f5614fb0b # v4 + with: + path: example/build/web + + deploy: + needs: build + runs-on: ubuntu-latest + timeout-minutes: 10 + permissions: + pages: write + id-token: write + environment: + name: github-pages + url: ${{ steps.deployment.outputs.page_url }} + + steps: + - name: Deploy to GitHub Pages + id: deployment + uses: actions/deploy-pages@d6db90164ac5ed86f2b6aed7e0febac5b3c0c03e # v4 diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml new file mode 100644 index 0000000..bf72834 --- /dev/null +++ b/.github/workflows/publish.yml @@ -0,0 +1,76 @@ +name: Publish + +on: + push: + tags: + - "v[0-9]+.[0-9]+.[0-9]+" + +jobs: + validate: + runs-on: ubuntu-latest + timeout-minutes: 30 + permissions: + contents: read + + steps: + - name: Check out source + uses: actions/checkout@d23441a48e516b6c34aea4fa41551a30e30af803 # v6 + with: + persist-credentials: false + + - name: Set up Flutter + uses: subosito/flutter-action@1a449444c387b1966244ae4d4f8c696479add0b2 # v2 + with: + channel: stable + cache: true + pub-cache: true + + - name: Match tag to pubspec + shell: bash + run: | + package_version="$(awk '$1 == "version:" { print $2; exit }' pubspec.yaml)" + test "${GITHUB_REF_NAME}" = "v${package_version}" || { + echo "Tag ${GITHUB_REF_NAME} does not match pubspec version ${package_version}" >&2 + exit 1 + } + + - name: Install dependencies + run: flutter pub get + + - name: Check formatting + run: dart format --output=none --set-exit-if-changed . + + - name: Analyze + run: flutter analyze --fatal-infos --fatal-warnings + + - name: Run tests + run: flutter test + + - name: Validate package + run: dart pub publish --dry-run + + publish: + needs: validate + permissions: + id-token: write + uses: dart-lang/setup-dart/.github/workflows/publish.yml@65eb853c7ba17dde3be364c3d2858773e7144260 # v1 + with: + environment: pub.dev + + release: + needs: publish + runs-on: ubuntu-latest + timeout-minutes: 5 + permissions: + contents: write + + steps: + - name: Create GitHub release + env: + GH_TOKEN: ${{ github.token }} + run: >- + gh release create "${GITHUB_REF_NAME}" + --repo "${GITHUB_REPOSITORY}" + --verify-tag + --generate-notes + --title "${GITHUB_REF_NAME}" diff --git a/README.md b/README.md index 526da8f..ff4df90 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,10 @@ # morphnext +[![CI](https://github.com/KickNext/morphnext/actions/workflows/ci.yml/badge.svg)](https://github.com/KickNext/morphnext/actions/workflows/ci.yml) +[![Web demo](https://github.com/KickNext/morphnext/actions/workflows/pages.yml/badge.svg)](https://kicknext.github.io/morphnext/) +[![pub.dev](https://img.shields.io/pub/v/morphnext.svg)](https://pub.dev/packages/morphnext) +[![MIT license](https://img.shields.io/badge/license-MIT-blue.svg)](LICENSE) + **Morph into what’s next.** morphnext turns bundled Flutter `IconData` glyphs into interruptible, From 9b65fe618c15372b2ff778701bb28d8b279ccc83 Mon Sep 17 00:00:00 2001 From: KickNext Date: Sun, 16 Aug 2026 00:32:28 +0500 Subject: [PATCH 2/2] Avoid duplicate CI runs on branches --- .github/workflows/ci.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 23f07be..d3ca665 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -2,6 +2,7 @@ name: CI on: push: + branches: [main] pull_request: concurrency: