Skip to content

feat(): Read cm portal token from env var (#67) #205

feat(): Read cm portal token from env var (#67)

feat(): Read cm portal token from env var (#67) #205

Workflow file for this run

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@v2
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@v2
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@v2
with:
name: Cmf.CustomerPortal.Sdk.PowerShell-${{ steps.getver.outputs.result }}
path: src/Powershell/bin/Release/net8.0/linux-x64/publish/