File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ name : Push NuGet Package
2+
3+ on :
4+ push :
5+ branches :
6+ - master
7+ tags :
8+ - " v*"
9+
10+ env :
11+ DOTNET_VERSION : ' 10.0.x'
12+
13+ jobs :
14+ push-nuget :
15+ name : Build,Pack and Push NuGet Package
16+ runs-on : ubuntu-latest
17+
18+ steps :
19+ - name : Checkout code
20+ uses : actions/checkout@v5
21+
22+ - name : Setup .NET
23+ uses : actions/setup-dotnet@v4
24+ with :
25+ dotnet-version : ${{ env.DOTNET_VERSION }}
26+
27+ - name : Restore
28+ run : dotnet restore
29+
30+ - name : Build
31+ run : dotnet build -c Release --no-restore
32+
33+ - name : Pack
34+ run : dotnet pack -c Release --no-build -o to_push_packs
35+
36+ - name : Push to NuGet
37+ run : dotnet nuget push to_push_packs/*.nupkg --api-key ${{ secrets.NUGET_API_KEY }} --source https://api.nuget.org/v3/index.json --skip-duplicate
Original file line number Diff line number Diff line change 11<Solution >
2- <Folder Name =" /files/" >
3- <File Path =" README.md" />
4- <File Path =" .editorconfig" />
5- <File Path =" .gitignore" />
6- <File Path =" Directory.Build.props" />
7- </Folder >
8- <Project Path =" src\AutoLaunch\AutoLaunch.csproj" Type =" Classic C#" />
2+ <Folder Name =" /files/" >
3+ <File Path =" README.md" />
4+ <File Path =" .editorconfig" />
5+ <File Path =" .gitignore" />
6+ <File Path =" Directory.Build.props" />
7+ </Folder >
8+ <Folder Name =" /files/github_workflows/" >
9+ <File Path =" .github/workflows/push-nuget.yml" />
10+ </Folder >
11+ <Project Path =" src\AutoLaunch\AutoLaunch.csproj" Type =" Classic C#" />
912</Solution >
You can’t perform that action at this time.
0 commit comments