|
22 | 22 | build-windows-release: |
23 | 23 | runs-on: ${{ matrix.runs-on }} |
24 | 24 | if: github.repository_owner == 'llvm' |
| 25 | + outputs: |
| 26 | + digest: ${{ steps.digest.outputs.digest }} |
| 27 | + artifact-id: ${{ steps.artifact-upload.outputs.artifact-id }} |
| 28 | + installer-name: ${{ steps.variables.outputs.installer-name }} |
25 | 29 | strategy: |
26 | 30 | fail-fast: false |
27 | 31 | matrix: |
|
32 | 36 | - name: Setup crlf |
33 | 37 | shell: bash |
34 | 38 | run: | |
35 | | - #for f in `find /c/hostedtoolcache/windows/Python/3.9.13/x64/ -iname pyconfig.h`; do |
36 | | - # cat $f |
37 | | - #done |
38 | 39 | git config --global core.autocrlf false |
39 | | -# - name: Setup Python |
40 | | -# id: setup-python |
41 | | -# uses: actions/setup-python@e797f83bcb11b83ae66e0230d6156d7c80228e7c # v6.0.0 |
42 | | -# with: |
43 | | -# python-version: '3.9' |
44 | 40 | - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1A |
45 | 41 | with: |
46 | 42 | ref: ${{ (inputs.release-version && format('llvmorg-{0}', inputs.release-version)) || github.sha }} |
@@ -83,15 +79,41 @@ jobs: |
83 | 79 | mv llvm_package_${{ steps.variables.outputs.version-string}}\${{ steps.variables.outputs.installer-dir }}\${{ steps.variables.outputs.installer-name }} ${{ github.workspace }} |
84 | 80 | mv llvm_package_${{ steps.variables.outputs.version-string}}\${{ steps.variables.outputs.tar-name }} ${{ github.workspace }} |
85 | 81 |
|
86 | | - - name: Upload Installer |
87 | | - uses: ./.github/workflows/upload-release-artifact |
| 82 | + - name: Generate sha256 digest for binaries |
| 83 | + id: digest |
| 84 | + run: | |
| 85 | + echo "digest=$(cat ${{ steps.variables.outputs.tar-name }} ${{ steps.variables.outputs.installer-name }} | sha256sum | cut -d ' ' -f 1)" >> $GITHUB_OUTPUT |
| 86 | +
|
| 87 | + - name: Release Binary Artifact |
| 88 | + id: artifact-upload |
| 89 | + uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # v5.0.0 |
88 | 90 | with: |
89 | | - files: ${{ steps.variables.outputs.installer-name }} |
90 | | - upload: false |
91 | | - |
92 | | - - name: Upload Tar |
| 91 | + name: windows-release-binaries-${{ steps.variables.outputs.version-string }} |
| 92 | + path: | |
| 93 | + ${{ steps.variables.outputs.installer-name }} |
| 94 | + ${{ steps.variables.outputs.tar-name }} |
| 95 | +
|
| 96 | + upload-windows-release: |
| 97 | + runs-on: windows-2022 |
| 98 | + if: github.repository_owner == 'llvm' && |
| 99 | + github.event_name != 'pull_request' |
| 100 | + needs: |
| 101 | + - build-windows-release |
| 102 | + permissions: |
| 103 | + id-token: write |
| 104 | + attestations: write |
| 105 | + steps: |
| 106 | + - name: Checkout Release Scripts |
| 107 | + uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0 |
| 108 | + with: |
| 109 | + sparse-checkout: | |
| 110 | + .github/workflows/upload-release-artifact |
| 111 | + llvm/utils/release/github-upload-release.py |
| 112 | + llvm/utils/git/requirements.txt |
| 113 | + sparse-checkout-cone-mode: false |
| 114 | + - name: Upload Artifacts |
93 | 115 | uses: ./.github/workflows/upload-release-artifact |
94 | 116 | with: |
95 | | - files: ${{ steps.variables.outputs.tar-name }} |
96 | | - upload: false |
97 | | - |
| 117 | + artifact-id: ${{ needs.build-windows-release.outputs.artifact-id }} |
| 118 | + attestation-name: ${{ needs.build-windows-release.outputs.installer-name }} |
| 119 | + digest: ${{ needs.build-windows-release.outputs.digest }} |
0 commit comments