Skip to content

Commit dd1336f

Browse files
committed
👷 Updates Publish Workflow
1 parent a5b5a1a commit dd1336f

File tree

1 file changed

+30
-24
lines changed

1 file changed

+30
-24
lines changed

.github/workflows/release.yml

Lines changed: 30 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -11,21 +11,21 @@ jobs:
1111
begin-release:
1212
name: Begin Release
1313
runs-on: ubuntu-latest
14-
if: ${{ github.event.workflow_run.conclusion == 'success' }}
14+
if: github.event.workflow_run.conclusion == 'success'
1515
steps:
1616
- run: echo "Beginning release."
17-
- name: "Transfer 'version.json' artifact from triggering workflow"
18-
uses: pwshrc/[email protected].0
17+
- name: "Transfer 'version-json' artifact from triggering workflow"
18+
uses: pwshrc/[email protected].2
1919
with:
20-
name: 'version.json'
20+
name: 'version-json'
2121
- name: "Transfer 'PSGallery-package' artifact from triggering workflow"
22-
uses: pwshrc/[email protected].0
22+
uses: pwshrc/[email protected].2
2323
with:
2424
name: 'PSGallery-package'
25-
- name: "Transfer 'release-notes.md' artifact from triggering workflow"
26-
uses: pwshrc/[email protected].0
25+
- name: "Transfer 'release-notes' artifact from triggering workflow"
26+
uses: pwshrc/[email protected].2
2727
with:
28-
name: 'release-notes.md'
28+
name: 'release-notes'
2929

3030
test-publish-psgallery-package:
3131
name: Test Publish to PSGallery
@@ -34,19 +34,24 @@ jobs:
3434
steps:
3535
- name: Check out repository code
3636
uses: actions/checkout@v3
37+
- name: Populate GitVersion variables
38+
id: gitversion_vars
39+
uses: pwshrc/[email protected]
40+
with:
41+
mode: 'download'
3742
- name: "Get artifact: PSGallery-package"
3843
uses: actions/download-artifact@v3
3944
with:
4045
name: PSGallery-package
4146
path: ./out/
4247
- name: Publish Prerelease to PSGallery (WhatIf)
43-
if: "${{ steps.gitversion_vars.outputs.PreReleaseTag != '' }}"
44-
uses: pwshrc/[email protected].0
48+
if: steps.gitversion_vars.outputs.PreReleaseTag != ''
49+
uses: pwshrc/[email protected].2
4550
with:
4651
run: ./build/publish.ps1 -NUGET_KEY "abc" -Prerelease -WhatIf
4752
- name: Publish Release to PSGallery (WhatIf)
48-
if: "${{ steps.gitversion_vars.outputs.PreReleaseTag == '' }}"
49-
uses: pwshrc/[email protected].0
53+
if: steps.gitversion_vars.outputs.PreReleaseTag == ''
54+
uses: pwshrc/[email protected].2
5055
with:
5156
run: ./build/publish.ps1 -NUGET_KEY "abc" -WhatIf
5257

@@ -59,7 +64,7 @@ jobs:
5964
uses: actions/checkout@v3
6065
- name: Populate GitVersion variables
6166
id: gitversion_vars
62-
uses: pwshrc/actions-determine-version@v0.3.0
67+
uses: pwshrc/actions-determine-version@v0.8.0
6368
with:
6469
mode: 'download'
6570
- name: "Get artifact: PSGallery-package"
@@ -68,15 +73,15 @@ jobs:
6873
name: PSGallery-package
6974
path: ./out/
7075
- name: Publish Prerelease to PSGallery
71-
if: "${{ steps.gitversion_vars.outputs.PreReleaseTag != '' }}"
72-
uses: pwshrc/[email protected].0
76+
if: steps.gitversion_vars.outputs.PreReleaseTag != ''
77+
uses: pwshrc/[email protected].2
7378
env:
7479
NUGET_KEY: ${{ secrets.NUGET_KEY }}
7580
with:
7681
run: ./build/publish.ps1 -NUGET_KEY "$env:NUGET_KEY" -Prerelease
7782
- name: Publish Release to PSGallery
78-
if: "${{ steps.gitversion_vars.outputs.PreReleaseTag == '' }}"
79-
uses: pwshrc/[email protected].0
83+
if: steps.gitversion_vars.outputs.PreReleaseTag == ''
84+
uses: pwshrc/[email protected].2
8085
env:
8186
NUGET_KEY: ${{ secrets.NUGET_KEY }}
8287
with:
@@ -89,16 +94,17 @@ jobs:
8994
steps:
9095
- name: Check out repository code
9196
uses: actions/checkout@v3
92-
- name: Populate GitVersion variables
97+
- name: Get GitVersion
9398
id: gitversion_vars
94-
uses: pwshrc/actions-determine-version@v0.3.0
99+
uses: pwshrc/actions-determine-version@v0.8.0
95100
with:
96101
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+
uses: pwshrc/[email protected]
99105
with:
100-
name: release-notes.md
101-
path: ./out/
106+
mode: 'download'
107+
github_token: "${{ secrets.GITHUB_TOKEN }}"
102108
- name: "Get artifact: PSGallery-package"
103109
uses: actions/download-artifact@v3
104110
with:
@@ -113,7 +119,7 @@ jobs:
113119
tag_name: "v${{ steps.gitversion_vars.outputs.SemVer }}"
114120
target_commitish: "${{ steps.gitversion_vars.outputs.Sha }}"
115121
generate_release_notes: false
116-
body_path: ./out/release-notes.md
122+
body_path: ${{ steps.get-releasenotes.outputs.filepath }}
117123
prerelease: "${{ steps.gitversion_vars.outputs.PreReleaseTag != '' }}"
118124
draft: false
119125
files: |

0 commit comments

Comments
 (0)