Skip to content

Commit c11c034

Browse files
authored
main.yml updated
1 parent ca29a23 commit c11c034

File tree

1 file changed

+16
-11
lines changed

1 file changed

+16
-11
lines changed

.github/workflows/main.yml

Lines changed: 16 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -3,23 +3,28 @@ name: .NET Core
33
on:
44
push:
55
branches: [main]
6+
workflow_dispatch:
7+
8+
permissions:
9+
contents: read
610

711
jobs:
812
build:
9-
runs-on: ubuntu-latest
13+
runs-on: windows-latest
1014

1115
steps:
12-
- uses: actions/checkout@v2
13-
- name: Setup .NET Core
14-
uses: actions/setup-dotnet@v1
16+
- uses: actions/checkout@v3
17+
18+
- name: Set up .NET Core
19+
uses: actions/setup-dotnet@v2
1520
with:
1621
dotnet-version: 6.0.x
22+
1723
- name: Install dependencies
1824
run: dotnet restore src/Calabonga.AspNetCore.AppDefinitions.sln
19-
- name: Build
20-
run: dotnet build src/Calabonga.AspNetCore.AppDefinitions.sln --configuration Release --no-restore
21-
- name: Publish Calabonga.AspNetCore.AppDefinitions
22-
uses: brandedoutcast/[email protected]
23-
with:
24-
PROJECT_FILE_PATH: src/Calabonga.AspNetCore.AppDefinitions/Calabonga.AspNetCore.AppDefinitions.csproj
25-
NUGET_KEY: ${{secrets.NUGET_API_KEY}}
25+
26+
- name: Build the NuGet package
27+
run: dotnet build src/Calabonga.AspNetCore.AppDefinitions.sln --configuration Release --output ${{env.DOTNET_ROOT}}\Package
28+
29+
- name: Publish NuGet Package
30+
run: dotnet nuget push ${{env.DOTNET_ROOT}}\Package\*.nupkg --api-key ${{ secrets.NUGET_API_KEY }} --source https://api.nuget.org/v3/index.json

0 commit comments

Comments
 (0)