11name : Build
22on : [push, pull_request]
3- env :
4- DOTNET_CLI_TELEMETRY_OPTOUT : 1
3+
54jobs :
65 build :
76 runs-on : ubuntu-latest
@@ -13,42 +12,43 @@ jobs:
1312 - name : Setup .NET Core
1413 uses : actions/setup-dotnet@v1
1514 with :
16- dotnet-version : 3.1.100
15+ dotnet-version : 3.1.302
1716 - name : Build Reason
1817 run : " echo ref: ${{github.ref}} event: ${{github.event_name}}"
1918 - name : Build Version
20- id : version
21- uses : thefringeninja/action- minver@2.0.0-preview1
22- with :
23- tag-prefix : v
19+ run : |
20+ dotnet tool install --global minver-cli --version 2.3.0
21+ version=$(minver --tag-prefix v)
22+ echo "::set-env name=MINVERVERSIONOVERRIDE::$version"
2423 - name : Build
2524 run : dotnet build --configuration Release
25+ - name : Start Services
26+ run : docker-compose up -d && docker-compose up ready
2627 - name : Run Tests
27- run : dotnet test --configuration Release --results-directory artifacts -- no-build --logger:trx
28+ run : dotnet test --configuration Release --no-build
2829 - name : Package
2930 if : github.event_name != 'pull_request'
3031 run : dotnet pack --configuration Release --no-build
32+ - name : Install GitHub Package Tool
33+ if : github.event_name != 'pull_request'
34+ run : dotnet tool install gpr -g
3135 - name : Publish CI Packages
36+ if : github.event_name != 'pull_request'
3237 run : |
3338 for package in $(find -name "*.nupkg" | grep "minver" -v); do
3439 echo "${0##*/}": Pushing $package...
3540
36- # GPR
37- # workaround for GPR push issue
38- curl -sX PUT -u "foundatiofx:${{ secrets.GITHUB_TOKEN }}" -F package=@$package https://nuget.pkg.github.com/foundatiofx/
41+ # GitHub
42+ gpr push $package -k ${{ secrets.GITHUB_TOKEN }} || true
3943
40- # feedz (remove once GPR supports anonymous access )
41- dotnet nuget push $package --source https://f.feedz.io/foundatio/foundatio/nuget --api-key ${{ secrets.FEEDZ_KEY }}
44+ # feedz (remove once GPR supports anonymous)
45+ dotnet nuget push $package --source https://f.feedz.io/foundatio/foundatio/nuget --api-key ${{ secrets.FEEDZ_KEY }} --skip-duplicate
4246 done
4347 - name : Publish Release Packages
4448 if : startsWith(github.ref, 'refs/tags/v')
4549 run : |
4650 for package in $(find -name "*.nupkg" | grep "minver" -v); do
4751 echo "${0##*/}": Pushing $package...
48- dotnet nuget push $package --source https://api.nuget.org/v3/index.json --api-key ${{ secrets.NUGET_KEY }}
52+ dotnet nuget push $package --source https://api.nuget.org/v3/index.json --api-key ${{ secrets.NUGET_KEY }} --skip-duplicate
4953 done
50- - name : Upload Artifacts
51- uses : actions/upload-artifact@v1.0.0
52- with :
53- name : artifacts
54- path : artifacts
54+
0 commit comments