Skip to content

wip

wip #74

Workflow file for this run

name: CI
env:
PUBLISH_DIR: examples/jsMind.WASM.App/bin/Release/net6.0/publish/wwwroot
on:
push:
branches: [ '**' ]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: BlazorWebAssemblyFileHashFixer 1
uses: stefh/ghaction-BlazorWebAssemblyFileHashFixer@v1
with:
wwwroot-path: '.'
- name: Publish app
run: dotnet publish -c Release examples/jsMind.WASM.App
- name: Rewrite base href
uses: SteveSandersonMS/ghaction-rewrite-base-href@v1
with:
html_path: ${{ env.PUBLISH_DIR }}/index.html
base_href: /jsMind.Blazor/
- name: Patch blazor.webassembly.js for .NET 5
uses: jacobtomlinson/gha-find-replace@master
with:
find: "return r.loadResource\\(o,t\\(o\\),e\\[o\\],n\\)"
replace: "var p = r.loadResource(o,t(o),e[o],n); p.response.then((x) => { if (typeof window.loadResourceCallback === 'function') { window.loadResourceCallback(Object.keys(e).length, o, x);}}); return p;"
include: "**/blazor.webassembly.js"
- name: Patch blazor.webassembly.js for .NET 6
uses: jacobtomlinson/gha-find-replace@master
with:
find: "this.loadResource\\(r,t\\(r\\),e\\[r\\],n\\)"
replace: "{ const stef = this.loadResource(r,t(r),e[r],n); stef.response.then((x) => { if (typeof window.loadResourceCallback === 'function') { window.loadResourceCallback(Object.keys(e).length || 1, e); } }); return stef; }"
include: "**/blazor.webassembly.js"
- name: BlazorWebAssemblyFileHashFixer 2
uses: stefh/ghaction-BlazorWebAssemblyFileHashFixer@v2
with:
wwwroot-path: ${{ env.PUBLISH_DIR }}
- name: CompressFiles
uses: stefh/[email protected]
with:
path: ${{ env.PUBLISH_DIR }}