Update dependency Microsoft.Identity.Client to 4.66.2 #58
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 / publish | |
on: | |
push: | |
pull_request: | |
types: [opened, reopened] | |
release: | |
types: [published] | |
jobs: | |
main: | |
runs-on: windows-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Build | |
shell: pwsh | |
run: | | |
if ($env:GITHUB_REF -like "refs/tags/*") { | |
$versionnumber = $env:GITHUB_REF -replace "refs/tags/", "" | |
$manifestpath = "Rnwood.Dataverse.Data.PowerShell//Rnwood.Dataverse.Data.PowerShell.psd1" | |
(get-content -raw -encoding UTF8 $manifestpath ) -replace "ModuleVersion ?=.*", "ModuleVersion = `"$versionnumber`"" | set-content -encoding UTF8 $manifestpath | |
} | |
dotnet build -c Release ./Rnwood.Dataverse.Data.PowerShell/Rnwood.Dataverse.Data.PowerShell.csproj | |
if (test-path out/Rnwood.Dataverse.Data.PowerShell) { | |
remove-item -force -recurse out/Rnwood.Dataverse.Data.PowerShell | |
} | |
copy-item -recurse Rnwood.Dataverse.Data.PowerShell\bin\Release\netstandard2.0 out/Rnwood.Dataverse.Data.PowerShell | |
- name: Test - pwsh | |
shell: pwsh | |
run: | | |
$env:TESTMODULEPATH=(resolve-path "out/Rnwood.Dataverse.Data.PowerShell") | |
Install-Module -force Pester | |
Invoke-Pester -output detailed -path tests | |
if ($LASTEXITCODE -ne 0) { | |
throw "Tests failed" | |
} | |
- name: Test - powershell | |
shell: powershell | |
run: | | |
$env:TESTMODULEPATH=(resolve-path "out/Rnwood.Dataverse.Data.PowerShell") | |
Install-Module -force Pester | |
Invoke-Pester -output detailed -path tests | |
if ($LASTEXITCODE -ne 0) { | |
throw "Tests failed" | |
} | |
- name: Publish | |
if: github.event_name == 'release' && github.event.action == 'published' | |
env: | |
NUGET_KEY: ${{ secrets.NUGET_KEY }} | |
shell: pwsh | |
run: | | |
Publish-Module -Path out/Rnwood.Dataverse.Data.PowerShell -NuGetApiKey $env:NUGET_KEY -Verbose |