@@ -11,21 +11,21 @@ jobs:
11
11
begin-release :
12
12
name : Begin Release
13
13
runs-on : ubuntu-latest
14
- if : ${{ github.event.workflow_run.conclusion == 'success' }}
14
+ if : github.event.workflow_run.conclusion == 'success'
15
15
steps :
16
16
- run : echo "Beginning release."
17
- - name : " Transfer 'version. json' artifact from triggering workflow"
18
-
17
+ - name : " Transfer 'version- json' artifact from triggering workflow"
18
+
19
19
with :
20
- name : ' version. json'
20
+ name : ' version- json'
21
21
- name : " Transfer 'PSGallery-package' artifact from triggering workflow"
22
-
22
+
23
23
with :
24
24
name : ' PSGallery-package'
25
- - name : " Transfer 'release-notes.md ' artifact from triggering workflow"
26
-
25
+ - name : " Transfer 'release-notes' artifact from triggering workflow"
26
+
27
27
with :
28
- name : ' release-notes.md '
28
+ name : ' release-notes'
29
29
30
30
test-publish-psgallery-package :
31
31
name : Test Publish to PSGallery
@@ -34,19 +34,24 @@ jobs:
34
34
steps :
35
35
- name : Check out repository code
36
36
uses : actions/checkout@v3
37
+ - name : Populate GitVersion variables
38
+ id : gitversion_vars
39
+
40
+ with :
41
+ mode : ' download'
37
42
- name : " Get artifact: PSGallery-package"
38
43
uses : actions/download-artifact@v3
39
44
with :
40
45
name : PSGallery-package
41
46
path : ./out/
42
47
- name : Publish Prerelease to PSGallery (WhatIf)
43
- if : " ${{ steps.gitversion_vars.outputs.PreReleaseTag != '' }} "
44
-
48
+ if : steps.gitversion_vars.outputs.PreReleaseTag != ''
49
+
45
50
with :
46
51
run : ./build/publish.ps1 -NUGET_KEY "abc" -Prerelease -WhatIf
47
52
- name : Publish Release to PSGallery (WhatIf)
48
- if : " ${{ steps.gitversion_vars.outputs.PreReleaseTag == '' }} "
49
-
53
+ if : steps.gitversion_vars.outputs.PreReleaseTag == ''
54
+
50
55
with :
51
56
run : ./build/publish.ps1 -NUGET_KEY "abc" -WhatIf
52
57
59
64
uses : actions/checkout@v3
60
65
- name : Populate GitVersion variables
61
66
id : gitversion_vars
62
- uses : pwshrc/actions-determine-version@v0.3 .0
67
+ uses : pwshrc/actions-determine-version@v0.8 .0
63
68
with :
64
69
mode : ' download'
65
70
- name : " Get artifact: PSGallery-package"
@@ -68,15 +73,15 @@ jobs:
68
73
name : PSGallery-package
69
74
path : ./out/
70
75
- name : Publish Prerelease to PSGallery
71
- if : " ${{ steps.gitversion_vars.outputs.PreReleaseTag != '' }} "
72
-
76
+ if : steps.gitversion_vars.outputs.PreReleaseTag != ''
77
+
73
78
env :
74
79
NUGET_KEY : ${{ secrets.NUGET_KEY }}
75
80
with :
76
81
run : ./build/publish.ps1 -NUGET_KEY "$env:NUGET_KEY" -Prerelease
77
82
- name : Publish Release to PSGallery
78
- if : " ${{ steps.gitversion_vars.outputs.PreReleaseTag == '' }} "
79
-
83
+ if : steps.gitversion_vars.outputs.PreReleaseTag == ''
84
+
80
85
env :
81
86
NUGET_KEY : ${{ secrets.NUGET_KEY }}
82
87
with :
@@ -89,16 +94,17 @@ jobs:
89
94
steps :
90
95
- name : Check out repository code
91
96
uses : actions/checkout@v3
92
- - name : Populate GitVersion variables
97
+ - name : Get GitVersion
93
98
id : gitversion_vars
94
- uses : pwshrc/actions-determine-version@v0.3 .0
99
+ uses : pwshrc/actions-determine-version@v0.8 .0
95
100
with :
96
101
mode : ' download'
97
- - name : " Get artifact: release-notes.md"
98
- uses : actions/download-artifact@v3
102
+ - name : Get release notes
103
+ id : get-releasenotes
104
+
99
105
with :
100
- name : release-notes.md
101
- path : ./out/
106
+ mode : ' download '
107
+ github_token : " ${{ secrets.GITHUB_TOKEN }} "
102
108
- name : " Get artifact: PSGallery-package"
103
109
uses : actions/download-artifact@v3
104
110
with :
@@ -113,7 +119,7 @@ jobs:
113
119
tag_name : " v${{ steps.gitversion_vars.outputs.SemVer }}"
114
120
target_commitish : " ${{ steps.gitversion_vars.outputs.Sha }}"
115
121
generate_release_notes : false
116
- body_path : ./out/release-notes.md
122
+ body_path : ${{ steps.get-releasenotes.outputs.filepath }}
117
123
prerelease : " ${{ steps.gitversion_vars.outputs.PreReleaseTag != '' }}"
118
124
draft : false
119
125
files : |
0 commit comments