Main 124177 portal sdk unit tests #323
Workflow file for this run
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: Build | |
# Controls when the workflow will run | |
on: | |
# Triggers the workflow on push or pull request events but only for the main branch | |
push: | |
branches: [ main ] | |
pull_request: | |
branches: [ main ] | |
# Allows to run this workflow manually from the Actions tab | |
workflow_dispatch: | |
# Workflow jobs | |
jobs: | |
Build: | |
runs-on: ubuntu-latest | |
steps: | |
# Checkout | |
- name: Git checkout | |
uses: actions/checkout@v2 | |
# Needs .NET | |
- name: Setup .NET | |
uses: actions/setup-dotnet@v1 | |
with: | |
dotnet-version: 8.0.x | |
# Run build | |
- name: Build Windows | |
env: | |
DOTNET_CLI_TELEMETRY_OPTOUT: true | |
run: dotnet publish --configuration Release --self-contained --runtime win-x64 Cmf.CustomerPortal.Sdk.sln | |
- name: Build Linux | |
env: | |
DOTNET_CLI_TELEMETRY_OPTOUT: true | |
run: dotnet publish --configuration Release --self-contained --runtime linux-x64 Cmf.CustomerPortal.Sdk.sln | |
# Read version | |
- name: Read tool version | |
uses: QwerMike/xpath-action@v1 | |
id: getver | |
with: | |
filename: src/Version.props | |
expression: '/Project/PropertyGroup/Version/text()' | |
# Archive | |
- name: Archive Console Win64 | |
uses: actions/upload-artifact@v4 | |
with: | |
name: Cmf.CustomerPortal.Sdk.Console-${{ steps.getver.outputs.result }}.win-x64 | |
path: src/Console/bin/Release/net8.0/win-x64/publish/ | |
- name: Archive Console Linux64 | |
uses: actions/upload-artifact@v4 | |
with: | |
name: Cmf.CustomerPortal.Sdk.Console-${{ steps.getver.outputs.result }}.linux-x64 | |
path: src/Console/bin/Release/net8.0/linux-x64/publish/ | |
- name: Archive PowerShell | |
uses: actions/upload-artifact@v4 | |
with: | |
name: Cmf.CustomerPortal.Sdk.PowerShell-${{ steps.getver.outputs.result }} | |
path: src/Powershell/bin/Release/net8.0/linux-x64/publish/ |