Skip to content

Commit edbb699

Browse files
committed
👷 Updates Publish Workflow
1 parent 01a9cec commit edbb699

File tree

1 file changed

+13
-26
lines changed

1 file changed

+13
-26
lines changed

.github/workflows/release.yml

Lines changed: 13 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@ jobs:
4848
with:
4949
name: version.json
5050
path: ./version/version.json
51+
if-no-files-found: error
5152
- name: Unzip PSGallery-package
5253
shell: pwsh
5354
run: Expand-Archive -Path "PSGallery-package.zip" -DestinationPath ./package/
@@ -56,6 +57,7 @@ jobs:
5657
with:
5758
name: PSGallery-package
5859
path: ./package/*.nupkg
60+
if-no-files-found: error
5961
- name: Unzip release-notes.md
6062
shell: pwsh
6163
run: Expand-Archive -Path "release-notes.md.zip" -DestinationPath ./release-notes/
@@ -64,6 +66,7 @@ jobs:
6466
with:
6567
name: release-notes.md
6668
path: ./release-notes/release-notes.md
69+
if-no-files-found: error
6770

6871
test-publish-psgallery-package:
6972
name: Test Publish to PSGallery
@@ -90,7 +93,7 @@ jobs:
9093
Set-PSRepository PSGallery -InstallationPolicy Trusted
9194
./build/restore.ps1
9295
- name: "Get artifact: PSGallery-package"
93-
uses: actions/download-artifact@v2
96+
uses: actions/download-artifact@v3
9497
with:
9598
name: PSGallery-package
9699
path: ./out/
@@ -127,21 +130,13 @@ jobs:
127130
run: |
128131
Set-PSRepository PSGallery -InstallationPolicy Trusted
129132
./build/restore.ps1
130-
- name: "Get artifact: version.json"
131-
uses: actions/download-artifact@v2
132-
with:
133-
name: version.json
134-
path: ./out/
135133
- name: Populate GitVersion variables
136134
id: gitversion_vars
137-
shell: pwsh
138-
run: |
139-
[object] $version = Get-Content -Path ./out/version.json -Encoding UTF8 | ConvertFrom-Json
140-
foreach ($key in $version.PSObject.Properties.Name) {
141-
echo "::set-output name=$key::$($version.$key)"
142-
}
135+
uses: pwshrc/[email protected]
136+
with:
137+
mode: 'download'
143138
- name: "Get artifact: PSGallery-package"
144-
uses: actions/download-artifact@v2
139+
uses: actions/download-artifact@v3
145140
with:
146141
name: PSGallery-package
147142
path: ./out/
@@ -165,26 +160,18 @@ jobs:
165160
steps:
166161
- name: Check out repository code
167162
uses: actions/checkout@v3
168-
- name: "Get artifact: version.json"
169-
uses: actions/download-artifact@v2
170-
with:
171-
name: version.json
172-
path: ./out/
173163
- name: Populate GitVersion variables
174164
id: gitversion_vars
175-
shell: pwsh
176-
run: |
177-
[object] $version = Get-Content -Path ./out/version.json -Encoding UTF8 | ConvertFrom-Json
178-
foreach ($key in $version.PSObject.Properties.Name) {
179-
echo "::set-output name=$key::$($version.$key)"
180-
}
165+
uses: pwshrc/[email protected]
166+
with:
167+
mode: 'download'
181168
- name: "Get artifact: release-notes.md"
182-
uses: actions/download-artifact@v2
169+
uses: actions/download-artifact@v3
183170
with:
184171
name: release-notes.md
185172
path: ./out/
186173
- name: "Get artifact: PSGallery-package"
187-
uses: actions/download-artifact@v2
174+
uses: actions/download-artifact@v3
188175
with:
189176
name: PSGallery-package
190177
path: ./out/

0 commit comments

Comments
 (0)