@@ -2,7 +2,7 @@ name: .NET
22
33on :
44 push :
5- branches : [ develop, workflow ]
5+ branches : [ develop, master ]
66 pull_request :
77 branches : [ develop ]
88
3636 - name : Test 3.1
3737 run : dotnet test Community.Data.OData.Linq.xTests --no-build --verbosity normal --configuration Debug
3838 nuget-rc :
39- runs-on : ubuntu-latest
40- if : github.ref == 'refs/heads/workflow'
39+ runs-on : ubuntu-latest
40+ if : ${{ github.event_name != 'pull_request' }}
41+ needs : build
4142 steps :
4243 - uses : actions/checkout@v3
4344 - name : Setup net6.0
@@ -48,11 +49,15 @@ jobs:
4849 run : dotnet restore
4950 - name : Build
5051 run : dotnet build --no-restore --configuration Release
51- - name : Pack
52- run : dotnet pack -c Release -p:IncludeSymbols=true -p:SymbolPackageFormat=snupkg -p:VersionPrefix=${{ github.run_number }}-rc -o .\nupkg
53- - name : Push Linq
54- run : echo ${{ github.run_number }}
55- - name : Push Json
56- run : echo ${{ secrets.ODATA_NUGET_KEY }}
57- - name : Push AspNetCore
58- run : echo ${{ github.run_number }}
52+ - name : Pack Rc
53+ run : dotnet pack -c Release -p:IncludeSymbols=true -p:SymbolPackageFormat=snupkg -p:VersionPrefix=${{ github.run_number }}-rc -o .\nupkgrc
54+ if : github.ref == 'refs/heads/develop'
55+ - name : Pack
56+ run : dotnet pack -c Release -p:IncludeSymbols=true -p:SymbolPackageFormat=snupkg -p:VersionPrefix=${{ github.run_number }} -o .\nupkg
57+ if : github.ref == 'refs/heads/master'
58+ - name : Push Rc
59+ run : dotnet nuget push /nupkgrc/*.nupkg --api-key ${{ secrets.ODATA_NUGET_KEY }}
60+ if : github.ref == 'refs/heads/develop'
61+ - name : Push
62+ run : dotnet nuget push /nupkg/*.nupkg --api-key ${{ secrets.ODATA_NUGET_KEY }}
63+ if : github.ref == 'refs/heads/master'
0 commit comments