diff --git a/.github/workflows/deploy_pages.yaml b/.github/workflows/deploy_pages.yaml new file mode 100644 index 000000000..e0c2034b2 --- /dev/null +++ b/.github/workflows/deploy_pages.yaml @@ -0,0 +1,53 @@ +# Publish the GitHub Pages site for this repo. + +name: "Deploy Pages" + +on: + # Run on pushes to the default branch. + push: + branches: [ main ] + paths: + - '.github/workflows/deploy_pages.yaml' + - 'pkgs/markdown/**' + +jobs: + deploy: + permissions: + contents: read + pages: write + id-token: write + runs-on: ubuntu-latest + environment: + name: github-pages + url: ${{steps.deployment.outputs.page_url}} + + steps: + - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 + - uses: dart-lang/setup-dart@e630b99d28a3b71860378cafdc2a067c71107f94 + + # Build the markdown playground. + - name: "markdown: pub get" + run: dart pub get + working-directory: pkgs/markdown + - name: "markdown: build playground" + run: > + dart compile js -o example/app.dart.js + --minify --no-frequency-based-minification --no-source-maps + example/app.dart + working-directory: pkgs/markdown/example + + # Create the _site directory. + - run: mkdir _site + - run: cp -r pkgs/markdown/example _site/markdown + - run: rm _site/markdown/*.dart + + # Deploy to GitHub Pages. + - name: setup pages + uses: actions/configure-pages@v5 + - name: upload artifact + uses: actions/upload-pages-artifact@v3 + with: + path: _site + - name: deploy to github pages + id: deployment + uses: actions/deploy-pages@v4 diff --git a/.github/workflows/markdown.yaml b/.github/workflows/markdown.yaml index 59654b79d..5b4e569fb 100644 --- a/.github/workflows/markdown.yaml +++ b/.github/workflows/markdown.yaml @@ -18,12 +18,10 @@ on: env: PUB_ENVIRONMENT: bot.github - defaults: run: working-directory: pkgs/markdown/ - jobs: # Check code formatting and static analysis on a single OS (linux) # against Dart dev. @@ -48,6 +46,21 @@ jobs: run: dart analyze --fatal-infos if: always() && steps.install.outcome == 'success' + # Ensure the markdown playground builds. + build-playground: + runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + sdk: [stable] + steps: + - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 + - uses: dart-lang/setup-dart@e630b99d28a3b71860378cafdc2a067c71107f94 + with: + sdk: ${{ matrix.sdk }} + - run: dart pub get + - run: dart compile js -o example/app.dart.js example/app.dart + # Run tests on a matrix consisting of two dimensions: # 1. OS: ubuntu-latest, (macos-latest, windows-latest) # 2. release channel: dev diff --git a/.github/workflows/markdown_crash_test.yaml b/.github/workflows/markdown_crash_test.yaml index 1a00047d7..6e7aad2cd 100644 --- a/.github/workflows/markdown_crash_test.yaml +++ b/.github/workflows/markdown_crash_test.yaml @@ -1,5 +1,5 @@ -# Run against all markdown files in latest version of packages on pub.dev to -# see if any can provoke a crash +# Run against all markdown files in the latest version of packages on pub.dev +# to see if any can provoke a crash. name: "package:markdown: crash tests" diff --git a/.gitignore b/.gitignore index 4fe7cd529..d92c88004 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ # https://dart.dev/tools/pub/private-files .dart_tool pubspec.lock +_site/ diff --git a/pkgs/markdown/.gitignore b/pkgs/markdown/.gitignore index 6ff0be3dc..a48b1c475 100644 --- a/pkgs/markdown/.gitignore +++ b/pkgs/markdown/.gitignore @@ -3,3 +3,7 @@ .pub pubspec.lock doc/ + +example/app.dart.js +example/app.dart.js.deps +example/app.dart.js.map diff --git a/pkgs/markdown/CHANGELOG.md b/pkgs/markdown/CHANGELOG.md index 5f9f48af8..4b20f92f9 100644 --- a/pkgs/markdown/CHANGELOG.md +++ b/pkgs/markdown/CHANGELOG.md @@ -1,3 +1,8 @@ +## 7.3.1-wip + +* Update the README link to the markdown playground + (https://dart-lang.github.io/tools). + ## 7.3.0 * Move to `dart-lang/tools` monorepo. diff --git a/pkgs/markdown/README.md b/pkgs/markdown/README.md index 3b87484d1..5642563b7 100644 --- a/pkgs/markdown/README.md +++ b/pkgs/markdown/README.md @@ -2,11 +2,11 @@ [![pub package](https://img.shields.io/pub/v/markdown.svg)](https://pub.dev/packages/markdown) [![package publisher](https://img.shields.io/pub/publisher/markdown.svg)](https://pub.dev/packages/markdown/publisher) -A portable Markdown library written in Dart. It can parse Markdown into -HTML on both the client and server. +A portable Markdown library written in Dart. It can parse Markdown into HTML on +both the client and server. Play with it at -[dart-lang.github.io/markdown](https://dart-lang.github.io/markdown). +[dart-lang.github.io/tools/markdown](https://dart-lang.github.io/tools/markdown). ### Usage diff --git a/pkgs/markdown/lib/src/version.dart b/pkgs/markdown/lib/src/version.dart index 1e5327efa..bd14228ed 100644 --- a/pkgs/markdown/lib/src/version.dart +++ b/pkgs/markdown/lib/src/version.dart @@ -1,2 +1,2 @@ // Generated code. Do not modify. -const packageVersion = '7.3.0'; +const packageVersion = '7.3.1-wip'; diff --git a/pkgs/markdown/pubspec.yaml b/pkgs/markdown/pubspec.yaml index fadd44fa7..4f0c0d331 100644 --- a/pkgs/markdown/pubspec.yaml +++ b/pkgs/markdown/pubspec.yaml @@ -1,5 +1,5 @@ name: markdown -version: 7.3.0 +version: 7.3.1-wip description: >- A portable Markdown library written in Dart that can parse Markdown into HTML. repository: https://github.com/dart-lang/tools/tree/main/pkgs/markdown