Skip to content

Add support for Zstd compressed static files #97

Add support for Zstd compressed static files

Add support for Zstd compressed static files #97

name: GithubActionsWIP
on:
push:
branches:
- 'main'
pull_request:
branches:
- 'main'
env:
buildPlatform: 'Any CPU'
buildConfiguration: 'Release'
outputCSFB: ${{github.workspace}}/siteCSFB
projectCSFB: 'CompressedStaticFiles.AspNet/CompressedStaticFiles.AspNet.csproj'
jobs:
############################################################################################################
# Build nuget package
############################################################################################################
build-package:
name: Build nuget package
runs-on: windows-latest
steps:
- name: Set ciSuffix as env variable
run: echo "ciSuffix=ci.$(date +'%Y-%m-%d--%H%M')" >> $GITHUB_ENV
shell: bash
- name: Checkout repository under $GITHUB_WORKSPACE so the job can access it 🛎️
uses: actions/checkout@v3
with:
persist-credentials: false
- name: Use prelease dotnet
uses: actions/setup-dotnet@v2
with:
dotnet-version: '8.x'
include-prerelease: true
- name: Build CompressedStaticFiles.AspNetCore 🔧
run: dotnet build ${{env.projectCSFB}} --configuration ${{env.buildConfiguration}} --version-suffix ${{env.ciSuffix}}
- name: Generate the NuGet package 🔧
run: dotnet pack ${{env.projectCSFB}} --no-build --configuration ${{env.buildConfiguration}} --output ${{env.outputCSFB}} -p:IncludeSymbols=true -p:SymbolPackageFormat=snupkg -p:Version=1.0.0-${{env.ciSuffix}}
- name: Display CompressedStaticFiles.AspNetCore package output Ꙫ
run: dir ${{env.outputCSFB}}