Skip to content

chore: Update dependency MarkMpn.Sql4Cds.Engine to 9.5.0 (#18) #76

chore: Update dependency MarkMpn.Sql4Cds.Engine to 9.5.0 (#18)

chore: Update dependency MarkMpn.Sql4Cds.Engine to 9.5.0 (#18) #76

Workflow file for this run

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