Skip to content

Commit 0fcaad6

Browse files
Merge pull request #27 from EvaisaDev/release-artifact-fix
refactor release artifact upload entirely
2 parents 151f8bb + 6e9c6b8 commit 0fcaad6

File tree

1 file changed

+29
-9
lines changed

1 file changed

+29
-9
lines changed

.github/workflows/publish.yml

Lines changed: 29 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -215,25 +215,45 @@ jobs:
215215
name: msbuild-nupkg-build
216216
path: "./NetcodePatcher.MSBuild/bin/ReleaseTools/*.nupkg"
217217

218-
upload-release-artifacts:
219-
name: Upload Release Artifacts
220-
needs: [build-cli-binaries, build-cli-nupkg, build-msbuild-nupkg, build-patchers]
218+
upload-nupkgs-to-release:
219+
name: Upload nupkg release artifacts
220+
needs: [build-cli-nupkg, build-msbuild-nupkg, build-patchers]
221221
runs-on: ubuntu-latest
222222
steps:
223223
- name: Fetch Sources
224224
uses: actions/checkout@v4
225225

226-
- name: Download all artifacts
226+
- name: Download all nupkg artifacts
227227
uses: actions/download-artifact@v4
228+
with:
229+
path: ./nupkg-build
230+
pattern: "*-nupkg-build"
231+
merge-multiple: true
232+
233+
- name: Upload artifacts to Release
234+
env:
235+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
236+
run: gh release upload ${{ github.event.release.tag_name }} ./nupkg-build/*.nupkg
237+
238+
upload-binaries-to-release:
239+
name: Upload binary release artifacts
240+
needs: build-cli-binaries
241+
runs-on: ubuntu-latest
242+
steps:
243+
- name: Fetch Sources
244+
uses: actions/checkout@v4
245+
246+
- name: Download all binary artifacts
247+
uses: actions/download-artifact@v4
248+
with:
249+
path: ./zip-build
250+
pattern: "*-zip-build"
251+
merge-multiple: true
228252

229253
- name: Upload artifacts to Release
230254
env:
231255
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
232-
run: gh release upload ${{ github.event.release.tag_name }} \
233-
"cli-*-zip-build/*.zip" \
234-
"cli-nupkg-build/*.nupkg" \
235-
"nv*-patcher-nupkg-build/*.nupkg" \
236-
"msbuild-nupkg-build/*.nupkg"
256+
run: gh release upload ${{ github.event.release.tag_name }} ./zip-build/*.zip
237257

238258
deploy-nuget:
239259
name: Deploy to NuGet

0 commit comments

Comments
 (0)