[llvm] Add Windows release binary builds (PR #150793)

via llvm-commits llvm-commits at lists.llvm.org
Wed Nov 26 01:41:03 PST 2025


================
@@ -0,0 +1,91 @@
+name: Release Binaries Windows
+
+on:
+  pull_request:
+  workflow_dispatch:
+    inputs:
+      release-version:
+        description: 'Release Version'
+        required: false
+        type: string
+      upload:
+        description: 'Upload binaries to the release page'
+        required: true
+        default: false
+
+
+permissionks:
+  contents: read # Default everything to read-only
+
+jobs:
+  build-windows-release:
+    runs-on: ${{ matrix.runs-on }}
+    if: github.repository_owner == 'llvm'
+    strategy:
+      fail-fast: false
+      matrix:
+        runs-on:
+          - depot-windows-2022-16
+          - windows-11-arm
+    steps:
+      - name: Setup crlf
+        run: |
+          git config --global core.autocrlf false
+      - name: Setup Python
+        id: setup-python
+        uses: actions/setup-python at e797f83bcb11b83ae66e0230d6156d7c80228e7c # v6.0.0
+        with:
+          python-version: '3.9'
+      - uses: actions/checkout at b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1A
+        with:
+          ref: ${{ (inputs.release-version && format('llvmorg-{0}', inputs.release-version)) || github.sha }}
+      - id: version
+        uses: ./.github/workflows/get-llvm-version
+      - id: variables
+        shell: bash
+        run: |
+          if [ -z "${{ inputs.release-version }}" ]; then
+            version_string="${{ format('{0}.{1}.{2}', steps.version.outputs.major, steps.version.outputs.minor, steps.version.outputs.patch) }}"
+          else
+            version_string="${{inputs.release-version }}"
+          fi
+          case $RUNNER_ARCH in 
+            "X64" )
+              installer_arch="win64"
+              tar_arch="x86_64"
+              installer_dir_arch="amd64"
+              script_options="--x64"
+              ;;
+            "ARM64" )
+              installer_arch="woa64"
+              tar_arch="aarch64"
+              installer_dir_arch="arm64"
+              script_options="--arm64"
+              ;;
+          esac
+          echo "installer-name=LLVM-$version_string-$installer_arch.exe" >> $GITHUB_OUTPUT
+          echo "tar-name=$tar_arch-pc-windows-msvc.tar.xz" >> $GITHUB_OUTPUT 
+          echo "installer-dir=build_$installer_dir_arch" >> $GITHUB_OUTPUT
+          echo "script-options=$script_options" >> $GITHUB_OUTPUT
+          echo "version-string=$version_string" >> $GITHUB_OUTPUT
+      - env:
+          LDFLAGS: "-Wl,--verbose"
+        run: |
+          subst S: ${{ github.workspace }}
+          cd S:\llvm\utils\release\
+          .\build_llvm_release.bat ${{ steps.variables.outputs.script-options }} --version ${{ steps.variables.outputs.version-string }} --local-python --skip-checkout
+          # Move installer to top-level directory so it is easier to upload.
+          mv ${{ steps.variables.outputs.installer-dir }}/${{ steps.variables.outputs.installer-name }} .
+
+      - name: Upload Installer
+        uses: ./.github/workflows/upload-release-artifact
+        with:
+          files: ${{ steps.variables.outputs.installer-name }}
+          upload: false
+      
+      - name: Upload Tar
+        uses: ./.github/workflows/upload-release-artifact
+        with:
+          files: ${{ steps.variables.outputs.tar-name }}
+          upload: false
----------------
github-advanced-security[bot] wrote:

## Workflow does not contain permissions

Actions job or workflow does not limit the permissions of the GITHUB_TOKEN. Consider setting an explicit permissions block, using the following as a minimal starting point: {{contents: read}}

[Show more details](https://github.com/llvm/llvm-project/security/code-scanning/1528)

https://github.com/llvm/llvm-project/pull/150793


More information about the llvm-commits mailing list