File tree 2 files changed +33
-36
lines changed
2 files changed +33
-36
lines changed Original file line number Diff line number Diff line change @@ -23,32 +23,4 @@ build_script:
23
23
24
24
test : false
25
25
artifacts :
26
- - path : ' **\$(BUILD_ARTIFACT_PATH)\*'
27
-
28
- deploy :
29
- - provider : NuGet
30
- artifact : /.*nupkg/
31
- api_key :
32
- secure : QNfyCsBxCLb4iGmaRd2ep7yYY3RMJKw54B7p+ZcFDo5pb8KnWM0ULl4ml2u38s/w
33
- on :
34
- APPVEYOR_REPO_TAG : true
35
-
36
- - provider : NuGet
37
- server : https://nuget.pkg.github.com/TurnerSoftware/index.json
38
- artifact : /.*\.nupkg/
39
- skip_symbols : true
40
- username : TurnerSoftware
41
- api_key :
42
- secure : XnTMWCpraeRGwQ/HGCQIneJDAIIsF7MypVnaShycKC95P3+IA0MF+qXV16c8/5jg
43
- on :
44
- APPVEYOR_REPO_TAG : true
45
-
46
- - provider : GitHub
47
- artifact : /.*nupkg/
48
- draft : true
49
- release : $(APPVEYOR_REPO_TAG_NAME)
50
- description : ' TODO'
51
- auth_token :
52
- secure : 8WGv8noklaCJAQEBpcs+VShk/Hql5zbyx0VPhMvzUw0RcG7rAd2KxKIh4gazXlBi
53
- on :
54
- APPVEYOR_REPO_TAG : true
26
+ - path : ' **\$(BUILD_ARTIFACT_PATH)\*'
Original file line number Diff line number Diff line change @@ -68,14 +68,39 @@ jobs:
68
68
with :
69
69
name : coverage-report
70
70
path : Cobertura.xml
71
-
72
- release :
73
- name : Release
71
+
72
+ push-to-github-packages :
73
+ name : ' Push GitHub Packages'
74
+ needs : build
75
+ if : github.ref == 'refs/heads/main' || github.event_name == 'release'
76
+ environment :
77
+ name : ' GitHub Packages'
78
+ url : https://github.com/TurnerSoftware/BuildVersioning/packages
79
+ permissions :
80
+ packages : write
74
81
runs-on : ubuntu-latest
82
+ steps :
83
+ - name : ' Download build'
84
+ uses : actions/download-artifact@v2
85
+ with :
86
+ name : ' ubuntu-latest'
87
+ - name : ' Add NuGet source'
88
+ run : dotnet nuget add source https://nuget.pkg.github.com/TurnerSoftware/index.json --name GitHub --username Turnerj --password ${{secrets.GITHUB_TOKEN}} --store-password-in-clear-text
89
+ - name : ' Upload NuGet package'
90
+ run : dotnet nuget push *.nupkg --api-key ${{secrets.GH_PACKAGE_REGISTRY_API_KEY}} --source GitHub --skip-duplicate --no-symbols true
91
+
92
+ push-to-nuget :
93
+ name : ' Push NuGet Packages'
75
94
needs : build
76
95
if : github.event_name == 'release'
96
+ environment :
97
+ name : ' NuGet'
98
+ url : https://www.nuget.org/packages/TurnerSoftware.BuildVersioning
99
+ runs-on : ubuntu-latest
77
100
steps :
78
- - name : Download build
79
- uses : actions/download-artifact@v2
80
- - run : ls /ubuntu-latest
81
- # TODO: Upload to NuGet & GitHub Packages
101
+ - name : ' Download build'
102
+ uses : actions/download-artifact@v2
103
+ with :
104
+ name : ' ubuntu-latest'
105
+ - name : ' Upload NuGet package and symbols'
106
+ run : dotnet nuget push *.nupkg --source https://api.nuget.org/v3/index.json --skip-duplicate --api-key ${{secrets.NUGET_API_KEY}}
You can’t perform that action at this time.
0 commit comments