Skip to content

Commit

Permalink
Update and rename dotnet-core.yml to ci.yml (#55)
Browse files Browse the repository at this point in the history
  • Loading branch information
dpvreony authored Nov 18, 2023
1 parent 22a03db commit e7dc8b6
Showing 1 changed file with 12 additions and 28 deletions.
40 changes: 12 additions & 28 deletions .github/workflows/dotnet-core.yml → .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: .NET Core
name: CI

on:
push:
Expand Down Expand Up @@ -38,7 +38,7 @@ jobs:
uses: actions/setup-java@v3
with:
distribution: 'temurin' # See 'Supported distributions' for available options
java-version: '11'
java-version: '17'

- name: Install Windows SDK 10.0.16299
shell: pwsh
Expand All @@ -52,20 +52,10 @@ jobs:
$process.Start()
$process.WaitForExit()
- name: Setup .NET Core 3.1
- name: Install .NET 8
uses: actions/setup-dotnet@v3
with:
dotnet-version: 3.1.x

- name: Setup .NET 5
uses: actions/setup-dotnet@v3
with:
dotnet-version: 5.0.x

- name: Install .NET 6
uses: actions/setup-dotnet@v3
with:
dotnet-version: 6.0.x
dotnet-version: 8.0.x

- name: Install DotNet workloads
shell: bash
Expand All @@ -78,9 +68,7 @@ jobs:
Invoke-WebRequest -Uri "https://github.com/microsoft/sbom-tool/releases/latest/download/sbom-tool-win-x64.exe" -OutFile "D:\a\_temp\sbom-tool.exe"
- name: Add MSBuild to PATH
uses: glennawatson/[email protected]
with:
prerelease: true
uses: microsoft/setup-msbuild@3404ff3d40458f8d1fdf55c2bcc442b970404ad7

# This mitigates an issue with websdk projects loading analyzers from old packages.
- name: Cleanup nuget local storage
Expand Down Expand Up @@ -112,12 +100,15 @@ jobs:
- name: List Deprecated Packages
run: |
dotnet list ${{ env.solutionpath }} package --deprecated
dotnet list package --deprecated
working-directory: src
# TODO: pipe to text file, echo text file and error level fail build if not empty file?

- name: List Vulnerable Packages
run: |
dotnet list ${{ env.solutionpath }} package --vulnerable
# TODO: pipe to text file, echo text file and error level fail build if not empty file?
dotnet list package --vulnerable
working-directory: src

- name: NPM package restore
run: |
Expand Down Expand Up @@ -183,20 +174,13 @@ jobs:
echo "::notice::$coverageMessage"
echo $coverageMessage >> $GITHUB_STEP_SUMMARY
- name: Train Intellicode Model
uses: microsoft/vs-intellicode@v1
if: github.ref == 'refs/heads/main'
with:
directory: src

- name: List licenses
run: |
dotnet dotnet-project-licenses -i src --export-license-texts --output-directory artifacts/licenses
# - name: Generate SBOM
# shell: pwsh
# run: |
# D:\a\_temp\sbom-tool.exe generate -b artifacts/nuget -bc src -pn Whipstaff -pv $Env:NBGV_SimpleVersion -ps "DHGMS Solutions" -nsb https://sbom.dhgms.com -V Verbose -m artifacts\sbom
- name: Generate SBOM
run: |
dotnet sbom-tool generate -b artifacts/nuget -bc src -pn Whipstaff -pv $Env:NBGV_SimpleVersion -ps "DHGMS Solutions" -nsb https://sbom.dhgms.com -m artifacts\sbom
- name: List outdated packages
run: |
Expand Down

0 comments on commit e7dc8b6

Please sign in to comment.