diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 0ed90b6e7984c..b093b90b2e6a7 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -182,12 +182,12 @@ jobs: include: - runner: windows build-type: Release - arch: amd64 - suffix: "" + package_json_arch: "x64" + label: bun-webkit-windows-amd64 - runner: windows build-type: Debug - arch: amd64 - suffix: -debug + package_json_arch: "x64" + label: bun-webkit-windows-amd64-debug runs-on: ${{ matrix.runner }} timeout-minutes: 90 steps: @@ -215,10 +215,14 @@ jobs: $env:WEBKIT_OUTPUT_DIR = "bun-webkit" $env:BUN_WEBKIT_VERSION = "${{ github.sha }}" $env:CMAKE_BUILD_TYPE = "${{matrix.build-type}}" + $env:PACKAGE_JSON_LABEL = "${{matrix.label}}" + $env:GITHUB_SHA = "${{ github.sha }}" + $env:PACKAGE_JSON_ARCH = "${{matrix.package_json_arch}}" + $env:GITHUB_REPOSITORY = "${{ github.repository }}" ./windows-release.ps1 - uses: actions/upload-artifact@v3 with: - name: bun-webkit-windows-${{ matrix.arch }}${{ matrix.suffix }} + name: ${{matrix.label}} path: bun-webkit.tar.gz linux-musl: diff --git a/windows-release.ps1 b/windows-release.ps1 index 8dfab6a0dc6a4..82c2c500a632d 100644 --- a/windows-release.ps1 +++ b/windows-release.ps1 @@ -278,6 +278,15 @@ Copy-Item -r $WebKitBuild/WTF/Headers/wtf/* $output/include/wtf/ Copy-Item -r $ICU_STATIC_INCLUDE_DIR/* $output/include/ Copy-Item -r $ICU_STATIC_LIBRARY/* $output/lib/ +$packageJsonContent = @{ + name = $env:PACKAGE_JSON_LABEL + version = "0.0.1-$env:GITHUB_SHA" + os = @("windows") + cpu = @($env:PACKAGE_JSON_ARCH) + repository = "https://github.com/$($env:GITHUB_REPOSITORY)" +} | ConvertTo-Json -Depth 2 +Out-File -FilePath $output/package.json -InputObject $packageJsonContent + tar -cz -f "${output}.tar.gz" "${output}" if ($LASTEXITCODE -ne 0) { throw "tar failed with exit code $LASTEXITCODE" }