Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .github/CODEOWNERS
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
* @KickNext
21 changes: 21 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -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: ["*"]
7 changes: 7 additions & 0 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
## What changed

<!-- Briefly describe the user-visible or internal change. -->

## Verification

<!-- List the checks you ran, or explain why none were needed. -->
11 changes: 7 additions & 4 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ name: CI

on:
push:
branches: [main]
pull_request:

concurrency:
Expand All @@ -18,10 +19,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
Expand Down Expand Up @@ -66,7 +69,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
Expand All @@ -86,7 +89,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: |
Expand Down
66 changes: 66 additions & 0 deletions .github/workflows/pages.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
name: Web demo

on:
push:
branches: [main]
workflow_dispatch:

concurrency:
group: pages
cancel-in-progress: false

permissions:
contents: read
Comment on lines +12 to +13

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Grant Pages access to the build job

The build job inherits only contents: read, but actions/configure-pages queries the repository's Pages configuration using github.token, which requires Pages repository access. The pages: write permission declared under deploy applies only to that job, so every main-branch run will fail at Configure Pages before an artifact can reach the deploy job. Grant the build job at least pages: read (or apply the standard Pages permissions at workflow level).

Useful? React with 👍 / 👎.


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
76 changes: 76 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -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}"
5 changes: 5 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -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,
Expand Down