Skip to content

Commit 8e52d46

Browse files
committed
Integrate new attestation
1 parent 7f43d2a commit 8e52d46

File tree

1 file changed

+39
-17
lines changed

1 file changed

+39
-17
lines changed

.github/workflows/release-binaries-windows.yml

Lines changed: 39 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,10 @@ jobs:
2222
build-windows-release:
2323
runs-on: ${{ matrix.runs-on }}
2424
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 }}
2529
strategy:
2630
fail-fast: false
2731
matrix:
@@ -32,15 +36,7 @@ jobs:
3236
- name: Setup crlf
3337
shell: bash
3438
run: |
35-
#for f in `find /c/hostedtoolcache/windows/Python/3.9.13/x64/ -iname pyconfig.h`; do
36-
# cat $f
37-
#done
3839
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'
4440
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1A
4541
with:
4642
ref: ${{ (inputs.release-version && format('llvmorg-{0}', inputs.release-version)) || github.sha }}
@@ -83,15 +79,41 @@ jobs:
8379
mv llvm_package_${{ steps.variables.outputs.version-string}}\${{ steps.variables.outputs.installer-dir }}\${{ steps.variables.outputs.installer-name }} ${{ github.workspace }}
8480
mv llvm_package_${{ steps.variables.outputs.version-string}}\${{ steps.variables.outputs.tar-name }} ${{ github.workspace }}
8581
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
8890
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
93115
uses: ./.github/workflows/upload-release-artifact
94116
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

Comments
 (0)