Skip to content

v1.0.1

v1.0.1 #5

Workflow file for this run

# This workflow will build a .NET project
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-net
name: .Create Release Packages
on:
release:
types: [published]
permissions:
contents: write
jobs:
build:
name: Build the entire solution
runs-on: windows-latest
steps:
- uses: actions/checkout@v4
with:
submodules: recursive
- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: 9.0.x
- name: Restore .NET dependencies
working-directory: ./src
run: dotnet restore
- name: Build
working-directory: ./src
run: dotnet build --no-restore
- name: Upload Build Artifact
uses: actions/upload-artifact@v4
with:
name: buildArtifact
path: ./src
retention-days: 7
tests:
name: Run Unit Tests
runs-on: ubuntu-latest
needs: build
steps:
- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: 9.0.x
- uses: actions/download-artifact@v4
with:
name: buildArtifact
path: ./src
- name: Test
working-directory: ./src/NodeDev.Tests
run: dotnet test --no-build --verbosity normal
e2e-tests:
name: Run End To End Tests
runs-on: ubuntu-latest
needs: build
steps:
- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: 9.0.x
- uses: actions/download-artifact@master
with:
name: buildArtifact
path: ./src
- name: Build Necessary for Playwright
working-directory: ./src/NodeDev.EndToEndTests
run: dotnet build
- name: Allow run
run: chmod -R +x ./src/NodeDev.Blazor.Server/bin
- name: Ensure browsers are installed
run: pwsh ./src/NodeDev.EndToEndTests/bin/Debug/net9.0/playwright.ps1 install --with-deps
- name: Test
env:
HEADLESS: true
working-directory: ./src/NodeDev.EndToEndTests
run: dotnet test --no-build --verbosity normal
- name: Upload std Artifact
if: failure()
uses: actions/upload-artifact@v4
with:
name: logServer
path: ./src/NodeDev.Blazor.Server/logs
retention-days: 7
publish:
name: Publish and package
runs-on: windows-latest
needs: [build, tests, e2e-tests]
steps:
- uses: actions/checkout@v4
with:
submodules: recursive
- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: 9.0.x
# ------------------------------------------------------------------------- Windows
- name: Publish Web Server framework dependent (Windows x64)
working-directory: ./src/NodeDev.Blazor.Server
run: dotnet publish -c Release --runtime win-x64 --self-contained false -p:PublishSingleFile=true
- name: Zip Web Server framework dependent (Windows x64)
shell: pwsh
run: Compress-Archive -Path ./src/NodeDev.Blazor.Server/bin/Release/net9.0/win-x64/publish/* -DestinationPath ./Windows_x64_WebServer.zip
- name: Publish Web Server self contained (Windows x64)
working-directory: ./src/NodeDev.Blazor.Server
run: dotnet publish -c Release --runtime win-x64 --self-contained true -p:PublishSingleFile=true
- name: Zip Web Server self contained (Windows x64)
shell: pwsh
run: Compress-Archive -Path ./src/NodeDev.Blazor.Server/bin/Release/net9.0/win-x64/publish/* -DestinationPath ./Windows_x64_WebServer_SelfContained.zip
- name: Publish Web Server framework dependent (Windows arm64)
working-directory: ./src/NodeDev.Blazor.Server
run: dotnet publish -c Release --runtime win-arm64 --self-contained false -p:PublishSingleFile=true
- name: Zip Web Server framework dependent (Windows arm64)
shell: pwsh
run: Compress-Archive -Path ./src/NodeDev.Blazor.Server/bin/Release/net9.0/win-arm64/publish/* -DestinationPath ./Windows_arm64_WebServer.zip
- name: Publish Web Server self contained (Windows arm64)
working-directory: ./src/NodeDev.Blazor.Server
run: dotnet publish -c Release --runtime win-arm64 --self-contained true -p:PublishSingleFile=true
- name: Zip Web Server self contained (Windows arm64)
shell: pwsh
run: Compress-Archive -Path ./src/NodeDev.Blazor.Server/bin/Release/net9.0/win-arm64/publish/* -DestinationPath ./Windows_arm64_WebServer_SelfContained.zip
# ------------------------------------------------------------------------- Linux
- name: Publish Web Server framework dependent (Linux x64)
working-directory: ./src/NodeDev.Blazor.Server
run: dotnet publish -c Release --runtime linux-x64 --self-contained false -p:PublishSingleFile=true
- name: Zip Web Server self contained (Linux x64)
shell: pwsh
run: Compress-Archive -Path ./src/NodeDev.Blazor.Server/bin/Release/net9.0/linux-x64/publish/* -DestinationPath ./Linux_x64_WebServer.zip
- name: Publish Web Server self contained (Linux x64)
working-directory: ./src/NodeDev.Blazor.Server
run: dotnet publish -c Release --runtime linux-x64 --self-contained true -p:PublishSingleFile=true
- name: Zip Web Server self contained (Linux x64)
shell: pwsh
run: Compress-Archive -Path ./src/NodeDev.Blazor.Server/bin/Release/net9.0/linux-x64/publish/* -DestinationPath ./Linux_x64_WebServer_SelfContained.zip
- name: Publish Web Server framework dependent (Linux arm64)
working-directory: ./src/NodeDev.Blazor.Server
run: dotnet publish -c Release --runtime linux-arm64 --self-contained false -p:PublishSingleFile=true
- name: Zip Web Server self contained (Linux arm64)
shell: pwsh
run: Compress-Archive -Path ./src/NodeDev.Blazor.Server/bin/Release/net9.0/linux-arm64/publish/* -DestinationPath ./Linux_arm64_WebServer.zip
- name: Publish Web Server self contained (Linux arm64)
working-directory: ./src/NodeDev.Blazor.Server
run: dotnet publish -c Release --runtime linux-arm64 --self-contained true -p:PublishSingleFile=true
- name: Zip Web Server self contained (Linux arm64)
shell: pwsh
run: Compress-Archive -Path ./src/NodeDev.Blazor.Server/bin/Release/net9.0/linux-arm64/publish/* -DestinationPath ./Linux_arm64_WebServer_SelfContained.zip
# ------------------------------------------------------------------------- Windows MAUI
- name: Publish Desktop framework dependent (Windows x64)
working-directory: ./src/NodeDev.Blazor.MAUI
shell: pwsh
run: ./publishAndCleanup.ps1 -architecture "win-x64" -selfContained $False
- name: Zip Web Server framework dependent (Windows x64)
shell: pwsh
run: Compress-Archive -Path ./src/NodeDev.Blazor.Server/bin/Release/net9.0/win-x64/publish/* -DestinationPath ./Windows_x64_DesktopApp.zip
- name: Publish Desktop self contained (Windows x64)
working-directory: ./src/NodeDev.Blazor.MAUI
shell: pwsh
run: ./publishAndCleanup.ps1 -architecture "win-x64" -selfContained $True
- name: Zip Web Server self contained (Windows x64)
shell: pwsh
run: Compress-Archive -Path ./src/NodeDev.Blazor.Server/bin/Release/net9.0/win-x64/publish/* -DestinationPath ./Windows_x64_DesktopApp_SelfContained.zip
- name: Publish Desktop framework dependent (Windows arm64)
working-directory: ./src/NodeDev.Blazor.MAUI
shell: pwsh
run: ./publishAndCleanup.ps1 -architecture "win-arm64" -selfContained $False
- name: Zip Web Server framework dependent (Windows arm64)
shell: pwsh
run: Compress-Archive -Path ./src/NodeDev.Blazor.Server/bin/Release/net9.0/win-arm64/publish/* -DestinationPath ./Windows_arm64_DesktopApp.zip
- name: Publish Desktop self contained (Windows arm64)
working-directory: ./src/NodeDev.Blazor.MAUI
shell: pwsh
run: ./publishAndCleanup.ps1 -architecture "win-arm64" -selfContained $True
- name: Zip Web Server self contained (Windows arm64)
shell: pwsh
run: Compress-Archive -Path ./src/NodeDev.Blazor.Server/bin/Release/net9.0/win-arm64/publish/* -DestinationPath ./Windows_arm64_DesktopApp_SelfContained.zip
- name: Create Release
uses: softprops/action-gh-release@v2
with:
files: |
./Windows_x64_WebServer.zip
./Windows_x64_WebServer_SelfContained.zip
./Windows_x64_DesktopApp.zip
./Windows_x64_DesktopApp_SelfContained.zip
./Windows_arm64_WebServer.zip
./Windows_arm64_WebServer_SelfContained.zip
./Windows_arm64_DesktopApp.zip
./Windows_arm64_DesktopApp_SelfContained.zip
./Linux_x64_WebServer.zip
./Linux_x64_WebServer_SelfContained.zip
./Linux_arm64_WebServer.zip
./Linux_arm64_WebServer_SelfContained.zip