-
Notifications
You must be signed in to change notification settings - Fork 0
23 lines (23 loc) · 942 Bytes
/
release.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
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