修改端口问题 #440
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Building and Packaging | |
on: | |
push: | |
branches: [ "master" ] | |
paths: [IoTSharp.*/**,IoTSharp/**,ClientApp/**] | |
jobs: | |
build: | |
strategy: | |
matrix: | |
configuration: [Release] | |
publish_profile: [win-x64,linux-x64,osx-x64,linux-arm64,linux-arm] # https://docs.microsoft.com/en-us/dotnet/core/rid-catalog | |
runs-on: windows-latest | |
env: | |
Solution_Name: IoTSharp.sln | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
submodules: 'true' | |
# Install the .NET Core workload | |
- name: Install .NET Core | |
uses: actions/setup-dotnet@v3 | |
with: | |
dotnet-version: 8.0.x | |
# Add MSBuild to the PATH: https://github.com/microsoft/setup-msbuild | |
- name: Setup MSBuild.exe | |
uses: microsoft/setup-msbuild@v1.1 | |
# Restore the application to populate the obj folder with RuntimeIdentifiers | |
- name: Restore the application | |
run: msbuild $env:Solution_Name /t:Restore /p:Configuration=$env:Configuration | |
env: | |
Configuration: ${{ matrix.configuration }} | |
# Create the app package by building and packaging the Windows Application Packaging project | |
# npm config set registry https://registry.npmmirror.com | |
- name: Building and Packaging | |
run: | | |
set NODE_OPTIONS=--openssl-legacy-provider | |
dotnet build IoTSharp.sln -c $env:Configuration /p:DeployOnBuild=true /p:PublishProfile=$env:PublishProfile | |
env: | |
Configuration: ${{ matrix.configuration }} | |
PublishProfile: ${{ matrix.publish_profile }} | |
# Upload the package: https://github.com/marketplace/actions/upload-a-build-artifact | |
- name: Upload build artifacts | |
uses: actions/upload-artifact@v3 | |
with: | |
name: IoTSharp ${{ matrix.configuration }} ${{ matrix.publish_profile }} | |
path: IoTSharp\bin\publish |