diff --git a/.github/actions/publish-browser-gallery/action.yml b/.github/actions/publish-browser-gallery/action.yml deleted file mode 100644 index bb6ebfe..0000000 --- a/.github/actions/publish-browser-gallery/action.yml +++ /dev/null @@ -1,21 +0,0 @@ -name: Publish Browser Gallery -description: >- - Publishes the Browser (WebAssembly) Gallery to ./browser-publish as the Gallery releases ship it, and checks that its - wwwroot holds the site. ci.yml and _build-gallery.yml run it after the checkout and setup-dotnet. - -runs: - using: composite - steps: - # WasmBuildNative links the SkiaSharp and HarfBuzz native libraries into dotnet.native.wasm. - - name: Install WebAssembly build tools - shell: bash - run: dotnet workload install wasm-tools - - - name: Publish Browser Gallery - shell: bash - run: | - dotnet publish Flowery.NET.Gallery.Browser/Flowery.NET.Gallery.Browser.csproj \ - -c Release \ - -o ./browser-publish - test -f ./browser-publish/wwwroot/index.html && test -d ./browser-publish/wwwroot/_framework \ - || { echo "::error::The published wwwroot has no index.html or _framework folder."; exit 1; } diff --git a/.github/workflows/_build-gallery.yml b/.github/workflows/_build-gallery.yml index ca5beb7..c1f2233 100644 --- a/.github/workflows/_build-gallery.yml +++ b/.github/workflows/_build-gallery.yml @@ -2,8 +2,6 @@ name: Build Gallery (Reusable) # Internal reusable workflow - called by release.yml and release-gallery.yml # Not meant to be triggered directly -# The Browser job runs the local action .github/actions/publish-browser-gallery from the checked-out ref, so a branch -# released from must contain it (main and alpha only after the 4.0.0 changes are merged into them). on: workflow_call: @@ -172,8 +170,17 @@ jobs: with: global-json-file: global.json + # WasmBuildNative links the SkiaSharp and HarfBuzz native libraries into dotnet.native.wasm. + - name: Install WebAssembly build tools + run: dotnet workload install wasm-tools + - name: Publish Browser Gallery - uses: ./.github/actions/publish-browser-gallery + run: | + dotnet publish Flowery.NET.Gallery.Browser/Flowery.NET.Gallery.Browser.csproj \ + -c Release \ + -o ./browser-publish + test -f ./browser-publish/wwwroot/index.html && test -d ./browser-publish/wwwroot/_framework \ + || { echo "::error::The published wwwroot has no index.html or _framework folder."; exit 1; } - name: Zip Browser artifact shell: bash diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 5e82020..813453e 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -347,8 +347,17 @@ jobs: with: global-json-file: global.json + # WasmBuildNative links the SkiaSharp and HarfBuzz native libraries into dotnet.native.wasm. + - name: Install WebAssembly build tools + run: dotnet workload install wasm-tools + - name: Publish Browser Gallery - uses: ./.github/actions/publish-browser-gallery + run: | + dotnet publish Flowery.NET.Gallery.Browser/Flowery.NET.Gallery.Browser.csproj \ + -c Release \ + -o ./browser-publish + test -f ./browser-publish/wwwroot/index.html && test -d ./browser-publish/wwwroot/_framework \ + || { echo "::error::The published wwwroot has no index.html or _framework folder."; exit 1; } # Playwright and its dependencies come with pinned versions and hashes. - name: Install Playwright and headless Chromium