Skip to content

v6.2.1

v6.2.1 #187

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, win-arm64, linux-arm64, osx-arm64]
env:
# Set the build number in MinVer.
MINVERBUILDMETADATA: build.${{github.run_number}}
steps:
- name: Harden Runner
uses: step-security/harden-runner@df199fb7be9f65074067a9eb93f12bb4c5547cf2 # v2.13.3
with:
egress-policy: audit
- name: Checkout repository
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
with:
fetch-depth: 0
- name: Setup .NET
uses: actions/setup-dotnet@2016bd2012dba4e32de620c46fe006a3ac9f0602 # v5.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@59cbc563d11314e48122193f8fe5cdda62ea6cf9 # v1.9.1
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' || matrix.rid == 'win-arm64') && '.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 }}