Skip to content

Release on nuget.org #1

Release on nuget.org

Release on nuget.org #1

Workflow file for this run

name: Release on nuget.org
on: workflow_dispatch
jobs:
build:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v3
- name: Install .NET Core SDK (global.json)
uses: actions/setup-dotnet@v3
with:
global-json-file: global.json
- name: Build project
working-directory: src/MSBuild.Sdk.PowerShell
run: dotnet build --configuration Release
- name: Run tests
working-directory: src/MSBuild.Sdk.PowerShell.Tests
run: dotnet test --configuration Release
- name: Create NuGet package
working-directory: src/MSBuild.Sdk.PowerShell
run: dotnet pack --configuration Release --no-build --output ./nupkg
- name: Upload to nuget.org
working-directory: src/MSBuild.Sdk.PowerShell
run: dotnet nuget push --api-key ${{ secrets.NUGET_GITHUB_ACTIONS_RELEASE }} --source https://api.nuget.org/v3/index.json ./nupkg/*.nupkg