Skip to content

Run Compile target before ResolveProjectStaticWebAssets #228

Run Compile target before ResolveProjectStaticWebAssets

Run Compile target before ResolveProjectStaticWebAssets #228

Workflow file for this run

name: .NET Core
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ windows-latest, macos-latest, ubuntu-latest ]
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Setup .NET 8
uses: actions/setup-dotnet@v3
with:
dotnet-version: 8.0.x
- name: Install dependencies
run: dotnet restore
- name: Build
run: dotnet build --configuration Release --no-restore
- name: Validate generated css files
run: |
test -s Samples/AspNetCore.SassCompiler.BlazorSample/Components/Pages/Counter.razor.css
test -s Samples/AspNetCore.SassCompiler.BlazorSample/obj/Release/net8.0/scopedcss/Components/Pages/Counter.razor.rz.scp.css
test -s Samples/AspNetCore.SassCompiler.BlazorWasmSample/Pages/Counter.razor.css
test -s Samples/AspNetCore.SassCompiler.BlazorWasmSample/obj/Release/net8.0/scopedcss/Pages/Counter.razor.rz.scp.css
test -s Samples/AspNetCore.SassCompiler.RazorClassLibrary/Component1.razor.css
test -s Samples/AspNetCore.SassCompiler.RazorClassLibrary/obj/Release/net6.0/scopedcss/Component1.razor.rz.scp.css
test -s Samples/AspNetCore.SassCompiler.Sample/wwwroot/css/site_sass.css
test -s Samples/AspNetCore.SassCompiler.Sample/wwwroot/lib/css/lib.min.css
publish:
runs-on: ubuntu-latest
needs: [ build ]
if: github.event_name == 'push' && github.ref == 'refs/heads/master'
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Setup .NET 8
uses: actions/setup-dotnet@v3
with:
dotnet-version: 8.0.x
- name: Publish NuGet
id: publish_nuget
uses: alirezanet/[email protected]
with:
PROJECT_FILE_PATH: AspNetCore.SassCompiler/AspNetCore.SassCompiler.csproj
PACKAGE_NAME: AspNetCore.SassCompiler
env:
NUGET_KEY: ${{ secrets.NUGET_KEY }}
- name: Create release
id: create_release
if: success() && steps.publish_nuget.outputs.version != ''
run: gh release create ${{ steps.publish_nuget.outputs.version }} --generate-notes
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}