-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
048a6da
commit ff11042
Showing
1 changed file
with
60 additions
and
0 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
# This workflow will build a .NET project | ||
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-net | ||
|
||
name: .NET | ||
|
||
on: | ||
push: | ||
branches: [ "main" ] | ||
pull_request: | ||
branches: [ "main" ] | ||
|
||
jobs: | ||
build: | ||
|
||
runs-on: windows-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Setup dotnet | ||
uses: actions/setup-dotnet@v3 | ||
with: | ||
dotnet-version: '7.0.x' | ||
- name: Display dotnet version | ||
run: dotnet --version | ||
- name: Install dependencies | ||
run: dotnet restore | ||
- name: Add Microsoft.PowerShell.SDK | ||
run: dotnet add package Microsoft.PowerShell.SDK --version 7.3.8 | ||
- name: Add PowerShellStandard.Library | ||
run: dotnet add package PowerShellStandard.Library --version 7.0.0-preview.1 | ||
- name: Add Newtonsoft.Json | ||
run: dotnet add package Newtonsoft.Json --version 13.0.3 | ||
- name: Display the path | ||
shell: pwsh | ||
run: echo ${env:PATH} | ||
- name: Version Display | ||
shell: pwsh | ||
run: $PSVersionTable | ||
# uncomment below to explore what modules/variables/env variables are available in the build image | ||
# - name: Modules and Variables Display | ||
# shell: pwsh | ||
# run: Get-Module -ListAvailable; (Get-Variable).GetEnumerator() | Sort-Object Name | Out-String; (Get-ChildItem env:*).GetEnumerator() | Sort-Object Name | Out-String | ||
- name: Bootstrap | ||
shell: pwsh | ||
run: ./actions_bootstrap.ps1 | ||
- name: Test and Build | ||
shell: pwsh | ||
run: Invoke-Build -File .\src\PSSimpleConfig.build.ps1 | ||
- name: Upload pester results | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: pester-results | ||
path: .\src\Artifacts\testOutput | ||
if-no-files-found: warn | ||
- name: Upload zip module archive build | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: zip-archive | ||
path: .\src\Archive | ||
if-no-files-found: warn |