CodeQL / Analyze (actions) (push) Canceled after 0s
CodeQL / Analyze (python) (push) Canceled after 0s
pre-commit / pre-commit (push) Canceled after 0s
Multi-Arch CI / setup (push) Canceled after 0s
Publish build_manylinux_x86_64 images / publish_build_manylinux_x86_64 (push) Canceled after 0s
Setup (Multi-Arch) / setup (push) Canceled after 0s
Multi-Arch CI / Linux::${{ fromJSON(needs.setup.outputs.linux_build_config || '{}').build_variant_label || 'skip' }} (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish no_rocm_image_ubi10 image / publish_no_rocm_image_ubi10 (push) Canceled after 0s
Multi-Arch CI / Windows::${{ fromJSON(needs.setup.outputs.windows_build_config || '{}').build_variant_label || 'skip' }} (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Multi-Arch CI / Manifest Diff (push) Canceled after 0s
TheRock Manifest Diff Report / Generate Manifest Diff Report (push) Canceled after 0s
Multi-Arch CI / CI Summary (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04 (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04_ocl_rt images / publish_no_rocm_image_ubuntu24_04_ocl_rt (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_rocgdb (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04_rocgdb images / publish_no_rocm_image_ubuntu24_04_rocgdb (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_ocl_rt (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Unit Tests / Unit Tests :: ubuntu-24.04 (push) Canceled after 0s
Unit Tests / Unit Tests :: windows-2022 (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_media (push) Canceled after 0s
Unit Tests / Unit Tests Summary (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_openmpi (push) Canceled after 0s
123 lines
4.4 KiB
YAML
123 lines
4.4 KiB
YAML
name: Upload Release Artifact
|
|
description: >-
|
|
Upload release artifact along with an attestation. The action assumes that
|
|
the llvm-project repository has already been checked out.
|
|
inputs:
|
|
release-version:
|
|
description: >-
|
|
The release where the artifact will be attached.
|
|
required: true
|
|
upload:
|
|
description: >-
|
|
Whether or not to upload the file and attestation to the release. If this
|
|
is set to false, then the file will be uploaded to the job as an artifact,
|
|
but no atteastion will be generated and the artifact won't be uploaded
|
|
to the release.
|
|
default: true
|
|
attestation-name:
|
|
description: >-
|
|
This will be used for the artifact name that is attached to the workflow and
|
|
will be used as the basename for the attestation file which will be called
|
|
$attestation-name.jsonl. If this is not set, it will default
|
|
to the falue of `files`.
|
|
required: false
|
|
artifact-id:
|
|
description: >-
|
|
Artifact id of the artifact with the files to upload.
|
|
required: true
|
|
digest:
|
|
description: >-
|
|
sha256 digest to verify the authenticity of the files being uploaded.
|
|
required: true
|
|
LLVM_TOKEN_GENERATOR_CLIENT_ID:
|
|
description: >-
|
|
Client ID for our GitHub App we use for generating access tokens.
|
|
required: true
|
|
LLVM_TOKEN_GENERATOR_PRIVATE_KEY:
|
|
description: >-
|
|
Private key for our GitHub App we use for generating access tokens.
|
|
required: true
|
|
|
|
runs:
|
|
using: "composite"
|
|
steps:
|
|
- name: Validate Input
|
|
uses: ./.github/workflows/validate-release-version
|
|
with:
|
|
release-version: ${{ inputs.release-version }}
|
|
|
|
- name: Download Artifact
|
|
uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
|
|
id: download-artifact
|
|
with:
|
|
artifact-ids: ${{ inputs.artifact-id }}
|
|
path: downloads
|
|
|
|
# In theory github artifacts are immutable so we could just rely on using
|
|
# the artifact-id to download it, but just to be extra safe we want to
|
|
# generated a digest for the files we are uploading so we can verify it
|
|
# when downloading.
|
|
# See also: https://irsl.medium.com/github-artifact-immutability-is-a-lie-9b6244095694
|
|
- name: Verify Files
|
|
shell: bash
|
|
env:
|
|
INPUTS_DIGEST: ${{ inputs.digest }}
|
|
DOWNLOAD_PATH: ${{ steps.download-artifact.outputs.download-path }}
|
|
run: |
|
|
digest_file="sha256"
|
|
echo "$INPUTS_DIGEST -" > $digest_file
|
|
cat $DOWNLOAD_PATH/* | sha256sum -c $digest_file
|
|
|
|
- name: Attest Build Provenance
|
|
id: provenance
|
|
# TODO(boomanaiden154): This is now a thin wrapper around actions/attest.
|
|
# We should eventually move over to that.
|
|
uses: actions/attest-build-provenance@a2bbfa25375fe432b6a289bc6b6cd05ecd0c4c32 # v4.1.0
|
|
with:
|
|
subject-path: ${{ steps.download-artifact.outputs.download-path }}/*
|
|
|
|
# Generate an attestation copy for each file to make it easier for users to verify
|
|
# the files.
|
|
- name: Rename attestation file
|
|
shell: bash
|
|
env:
|
|
DOWNLOAD_PATH: ${{ steps.download-artifact.outputs.download-path }}
|
|
BUNDLE_PATH: ${{ steps.provenance.outputs.bundle-path }}
|
|
run: |
|
|
for f in $DOWNLOAD_PATH/*; do
|
|
cp $BUNDLE_PATH $(basename $f).jsonl
|
|
done
|
|
|
|
- name: Upload Build Provenance
|
|
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
|
|
with:
|
|
name: ${{ inputs.attestation-name }}
|
|
path: |
|
|
*.jsonl
|
|
|
|
- name: Install Python Requirements
|
|
if: inputs.upload == 'true'
|
|
shell: bash
|
|
run: |
|
|
pip install --require-hashes -r ./llvm/utils/git/requirements.txt
|
|
|
|
- name: Check Permissions
|
|
uses: ./.github/workflows/require-team-membership
|
|
with:
|
|
team-slug: llvm-release-managers
|
|
LLVM_TOKEN_GENERATOR_CLIENT_ID: ${{ inputs.LLVM_TOKEN_GENERATOR_CLIENT_ID }}
|
|
LLVM_TOKEN_GENERATOR_PRIVATE_KEY: ${{ inputs.LLVM_TOKEN_GENERATOR_PRIVATE_KEY }}
|
|
|
|
- name: Upload Release
|
|
shell: bash
|
|
if: inputs.upload == 'true'
|
|
env:
|
|
INPUTS_RELEASE_VERSION: ${{ inputs.release-version }}
|
|
DOWNLOAD_PATH: ${{ steps.download-artifact.outputs.download-path }}
|
|
run: |
|
|
./llvm/utils/release/github-upload-release.py \
|
|
--token ${{ github.token }} \
|
|
--release "$INPUTS_RELEASE_VERSION" \
|
|
upload \
|
|
--files $DOWNLOAD_PATH/* *.jsonl
|