1
1
name : Build
2
2
on : [push, pull_request]
3
- env :
4
- DOTNET_CLI_TELEMETRY_OPTOUT : 1
3
+
5
4
jobs :
6
5
build :
7
6
runs-on : ubuntu-latest
@@ -13,42 +12,43 @@ jobs:
13
12
- name : Setup .NET Core
14
13
uses : actions/setup-dotnet@v1
15
14
with :
16
- dotnet-version : 3.1.100
15
+ dotnet-version : 3.1.302
17
16
- name : Build Reason
18
17
run : " echo ref: ${{github.ref}} event: ${{github.event_name}}"
19
18
- 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"
24
23
- name : Build
25
24
run : dotnet build --configuration Release
25
+ - name : Start Services
26
+ run : docker-compose up -d && docker-compose up ready
26
27
- name : Run Tests
27
- run : dotnet test --configuration Release --results-directory artifacts -- no-build --logger:trx
28
+ run : dotnet test --configuration Release --no-build
28
29
- name : Package
29
30
if : github.event_name != 'pull_request'
30
31
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
31
35
- name : Publish CI Packages
36
+ if : github.event_name != 'pull_request'
32
37
run : |
33
38
for package in $(find -name "*.nupkg" | grep "minver" -v); do
34
39
echo "${0##*/}": Pushing $package...
35
40
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
39
43
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
42
46
done
43
47
- name : Publish Release Packages
44
48
if : startsWith(github.ref, 'refs/tags/v')
45
49
run : |
46
50
for package in $(find -name "*.nupkg" | grep "minver" -v); do
47
51
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
49
53
done
50
- - name : Upload Artifacts
51
-
52
- with :
53
- name : artifacts
54
- path : artifacts
54
+
0 commit comments