Skip to content

v4.9.2

v4.9.2 #126

Workflow file for this run

name: Release
on:
release:
types:
- published
permissions:
contents: write
packages: write
jobs:
release:
runs-on: ubuntu-latest
strategy:
matrix:
rid: [win-x64, linux-x64, osx-x64]
env:
# Set the build number in MinVer.
MINVERBUILDMETADATA: build.${{github.run_number}}
steps:
- name: Checkout repository
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
with:
fetch-depth: 0
- name: Setup .NET
uses: actions/setup-dotnet@6bd8b7f7774af54e05809fcc5431931b3eb1ddee # v4.0.1
- name: Restore packages
run: dotnet restore
- name: Build CLI tool
run: dotnet publish --configuration Release --output ./bin --self-contained --runtime ${{ matrix.rid }} -p:PublishSingleFile=true -p:IncludeAllContentForSelfExtract=true -p:DebugType=None -p:PublishTrimmed=false ./src/Microsoft.ComponentDetection
- name: Publish CLI tool
uses: shogo82148/actions-upload-release-asset@8f032eff0255912cc9c8455797fd6d72f25c7ab7 # v1.7.5
continue-on-error: true
with:
upload_url: ${{ github.event.release.upload_url }}
asset_path: ./bin/*
asset_name: component-detection-${{ matrix.rid }}${{ matrix.rid == 'win-x64' && '.exe' || '' }}
- name: Build NuGet packages
run: dotnet pack --configuration Release --output ./out
- name: Publish NuGet packages to GitHub Packages
run: dotnet nuget push "./out/*.nupkg" --skip-duplicate --api-key ${{ secrets.GITHUB_TOKEN }} --source https://nuget.pkg.github.com/${{ github.repository_owner }}