2626 echo "RELEASE_ID=$(jq --raw-output '.release.id' $GITHUB_EVENT_PATH)" >> "$GITHUB_OUTPUT"
2727 - name : Publish for OS
2828 run : dotnet publish SimplestLoadBalancer.csproj -o ./publish/win-${{ matrix.rid }} -c Release -r win-${{ matrix.rid }} /p:Version=${{ steps.get_version.outputs.VERSION }}
29+ - name : Zip it Up
30+ shell : bash
31+ run : zip -r -j SimplestLoadBalancer-${{ github.ref_name }}-${{ matrix.rid }}.zip ./slb-${{ matrix.rid }}
32+ - name : Upload ZIP to Release
33+ shell : bash
34+ env :
35+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
36+ VERSION : ${{ github.ref_name }}
37+ FILE : SimplestLoadBalancer-${{ github.ref_name }}-${{ matrix.rid }}.zip
38+ URL : https://uploads.github.com/repos/${{ github.repository }}/releases/${{ steps.get_version.outputs.RELEASE_ID }}/assets?name=SimplestLoadBalancer-${{ github.ref_name }}-${{ matrix.rid }}.zip
39+ run : |
40+ echo $VERSION
41+ echo $URL
42+ AUTH="Authorization: token $GITHUB_TOKEN"
43+ echo $AUTH
44+ curl -sSL -XPOST -H "$AUTH" --upload-file "$FILE" --header "Content-Type:application/octet-stream" --write-out "%{http_code}" --output $(mktemp) "$URL"
2945 - name : Add msbuild to PATH
3046 uses : microsoft/setup-msbuild@v3
3147 - name : Install WiX
@@ -34,14 +50,14 @@ jobs:
3450 wix extension add WixToolset.UI.wixext
3551 wix extension add WixToolset.Firewall.wixext
3652 - name : Build WiX on Windows
37- run : wix build package.wxs -arch ${{ matrix.rid }} -define Version=${{ steps.get_version.outputs.VERSION }} -define PublishDir=./publish/win-${{ matrix.rid }} -o SimplestLoadBalancer-${{ steps.get_version.outputs.VERSION }}-win-${{ matrix.rid }}.msi -ext WixToolset.UI.wixext -ext WixToolset.Firewall.wixext
53+ run : wix build package.wxs -arch ${{ matrix.rid }} -define Version=${{ github.ref_name }} -define PublishDir=./publish/win-${{ matrix.rid }} -o SimplestLoadBalancer-${{ github.ref_name }}-win-${{ matrix.rid }}.msi -ext WixToolset.UI.wixext -ext WixToolset.Firewall.wixext
3854 - name : Upload MSI to Releaase
3955 shell : bash
4056 env :
4157 GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
42- VERSION : ${{ steps.get_version.outputs.VERSION }}
43- FILE : SimplestLoadBalancer-${{ steps.get_version.outputs.VERSION }}-win-${{ matrix.rid }}.msi
44- URL : https://uploads.github.com/repos/${{ github.repository }}/releases/${{ steps.get_version.outputs.RELEASE_ID }}/assets?name=SimplestLoadBalancer-${{ steps.get_version.outputs.VERSION }}-win-${{ matrix.rid }}.msi
58+ VERSION : ${{ github.ref_name }}
59+ FILE : SimplestLoadBalancer-${{ github.ref_name }}-win-${{ matrix.rid }}.msi
60+ URL : https://uploads.github.com/repos/${{ github.repository }}/releases/${{ steps.get_version.outputs.RELEASE_ID }}/assets?name=SimplestLoadBalancer-${{ github.ref_name }}-win-${{ matrix.rid }}.msi
4561 run : |
4662 echo $VERSION
4763 echo $URL
0 commit comments