Skip to content

chore(deps): update dependency dotnet-sdk to v9.0.306 (#783) #1963

chore(deps): update dependency dotnet-sdk to v9.0.306 (#783)

chore(deps): update dependency dotnet-sdk to v9.0.306 (#783) #1963

Workflow file for this run

name: Build
on:
push:
branches:
- main
pull_request:
release:
types:
- published
workflow_dispatch:
env:
# Disable the .NET logo in the console output.
DOTNET_NOLOGO: true
# Disable the .NET first time experience to skip caching NuGet packages and speed up the build.
DOTNET_SKIP_FIRST_TIME_EXPERIENCE: true
# Disable sending .NET CLI telemetry to Microsoft.
DOTNET_CLI_TELEMETRY_OPTOUT: true
# Set the build number in MinVer.
MINVERBUILDMETADATA: build.${{github.run_number}}
permissions: {}
jobs:
build:
name: Build-${{matrix.os}}
permissions:
contents: read
runs-on: ${{matrix.os}}
strategy:
matrix:
os: [ ubuntu-latest, windows-latest, macOS-latest ]
steps:
- name: 'Checkout'
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
with:
lfs: true
fetch-depth: 0
- name: 'Install .NET Core SDK'
uses: actions/setup-dotnet@d4c94342e560b34958eacfc5d055d21461ed1c5d # v5.0.0
- name: 'Dotnet Restore'
run: dotnet restore
shell: pwsh
- name: 'Dotnet Build'
run: dotnet build --configuration Release --no-restore
shell: pwsh
- name: 'Dotnet Test'
run: dotnet test --configuration Release --no-build --no-restore
shell: pwsh
- name: 'Dotnet Pack'
run: dotnet pack --configuration Release --no-build --no-restore --output ./artifacts
shell: pwsh
- name: 'Publish artifacts'
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
with:
name: ${{matrix.os}}
path: './artifacts'
push-nuget:
name: 'Push NuGet Packages'
needs: build
if: github.event_name == 'release'
environment:
name: 'NuGet'
url: https://www.nuget.org/packages/Octokit.Webhooks
permissions:
id-token: write
runs-on: windows-latest
steps:
- name: 'Download artifact'
uses: actions/download-artifact@634f93cb2916e3fdff6788551b99b062d0335ce0 # v5.0.0
with:
name: 'windows-latest'
- name: 'NuGet login'
uses: NuGet/login@d22cc5f58ff5b88bf9bd452535b4335137e24544 # v1.1.0
id: nuget-login
with:
user: ${{ secrets.NUGET_USER }}
- name: 'Dotnet NuGet Push'
run: |
Get-ChildItem .\ -Filter *.nupkg |
Where-Object { !$_.Name.Contains('preview') } |
ForEach-Object { dotnet nuget push $_ --source https://api.nuget.org/v3/index.json --skip-duplicate --api-key ${{steps.nuget-login.outputs.NUGET_API_KEY}} }
shell: pwsh