Skip to content

Commit

Permalink
Merge pull request #27 from EvaisaDev/release-artifact-fix
Browse files Browse the repository at this point in the history
refactor release artifact upload entirely
  • Loading branch information
Lordfirespeed committed Mar 2, 2024
2 parents 151f8bb + 6e9c6b8 commit 0fcaad6
Showing 1 changed file with 29 additions and 9 deletions.
38 changes: 29 additions & 9 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -215,25 +215,45 @@ jobs:
name: msbuild-nupkg-build
path: "./NetcodePatcher.MSBuild/bin/ReleaseTools/*.nupkg"

upload-release-artifacts:
name: Upload Release Artifacts
needs: [build-cli-binaries, build-cli-nupkg, build-msbuild-nupkg, build-patchers]
upload-nupkgs-to-release:
name: Upload nupkg release artifacts
needs: [build-cli-nupkg, build-msbuild-nupkg, build-patchers]
runs-on: ubuntu-latest
steps:
- name: Fetch Sources
uses: actions/checkout@v4

- name: Download all artifacts
- name: Download all nupkg artifacts
uses: actions/download-artifact@v4
with:
path: ./nupkg-build
pattern: "*-nupkg-build"
merge-multiple: true

- name: Upload artifacts to Release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: gh release upload ${{ github.event.release.tag_name }} ./nupkg-build/*.nupkg

upload-binaries-to-release:
name: Upload binary release artifacts
needs: build-cli-binaries
runs-on: ubuntu-latest
steps:
- name: Fetch Sources
uses: actions/checkout@v4

- name: Download all binary artifacts
uses: actions/download-artifact@v4
with:
path: ./zip-build
pattern: "*-zip-build"
merge-multiple: true

- name: Upload artifacts to Release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: gh release upload ${{ github.event.release.tag_name }} \
"cli-*-zip-build/*.zip" \
"cli-nupkg-build/*.nupkg" \
"nv*-patcher-nupkg-build/*.nupkg" \
"msbuild-nupkg-build/*.nupkg"
run: gh release upload ${{ github.event.release.tag_name }} ./zip-build/*.zip

deploy-nuget:
name: Deploy to NuGet
Expand Down

0 comments on commit 0fcaad6

Please sign in to comment.