File tree Expand file tree Collapse file tree 2 files changed +28
-41
lines changed Expand file tree Collapse file tree 2 files changed +28
-41
lines changed Original file line number Diff line number Diff line change 1- name : Continuous Integration
1+ name : " Deploy to NuGet "
22
33on :
44 push :
5- branches :
6- - main
7- pull_request :
8- branches :
9- - main
5+ tags :
6+ - " v*"
107
11- jobs :
12- build :
13- runs-on : ubuntu-latest
8+ env :
9+ PROJECT_PATH : " ValueMapper/ValueMapperCore/ValueMapperCore.csproj"
10+ PACKAGE_OUTPUT_DIRECTORY : ${{ github.workspace }}\output
11+ NUGET_SOURCE_URL : " https://api.nuget.org/v3/index.json"
1412
13+ jobs :
14+ deploy :
15+ name : " Deploy"
16+ runs-on : " windows-latest"
1517 steps :
16- - uses : actions/checkout@v3
18+ - name : " Checkout"
19+ uses : actions/checkout@v3
1720
18- - name : Setup .NET
21+ - name : " Install dotnet "
1922 uses : actions/setup-dotnet@v3
2023 with :
2124 dotnet-version : " 8.0.x"
2225
23- - name : Restore dependencies
24- run : dotnet restore
25- working-directory : ./ValueMapper
26+ - name : " Restore packages"
27+ run : dotnet restore ${{ env.PROJECT_PATH }}
28+
29+ - name : " Build project"
30+ run : dotnet build ${{ env.PROJECT_PATH }} --no-restore --configuration Release
31+
32+ - name : " Get Version"
33+ id : version
34+ uses : battila7/get-version-action@v2
35+
36+ - name : " Pack project"
37+ run : dotnet pack ${{ env.PROJECT_PATH }} --no-restore --no-build --configuration Release --include-symbols -p:PackageVersion=${{ steps.version.outputs.version-without-v }} --output ${{ env.PACKAGE_OUTPUT_DIRECTORY }}
2638
27- - name : Build
28- run : dotnet build --configuration Release --no-restore
29- working-directory : ./ValueMapper
39+ - name : " Push package"
40+ run : dotnet nuget push "${{ env.PACKAGE_OUTPUT_DIRECTORY }}\*.nupkg" -k ${{ secrets.NUGET_AUTH_TOKEN }} -s ${{ env.NUGET_SOURCE_URL }}
Load Diff This file was deleted.
You can’t perform that action at this time.
0 commit comments