llvm-project/.github/workflows/release-documentation.yml
Aiden Grossman ca44e11e00
[CI][Github] Bump actions/checkout to v5.0.0 (#153340)
https://github.com/actions/checkout/releases/tag/v5.0.0 was released a
couple of days ago (still new, sufficient bake time that there probably
is not a significant security issue). There are few changes, with the
most notable ones being dependency bumps, specifically the node version
bump to v24. This requires actions runner v2.327.1. I will land this
after all of the infrastructure has been moved over to the new runner
version.
2025-08-13 21:17:53 -07:00

92 lines
2.9 KiB
YAML

name: Release Documentation
permissions:
contents: read
on:
workflow_dispatch:
inputs:
release-version:
description: 'Release Version'
required: true
type: string
upload:
description: 'Upload documentation'
required: false
type: boolean
workflow_call:
inputs:
release-version:
description: 'Release Version'
required: true
type: string
upload:
description: 'Upload documentation'
required: false
type: boolean
jobs:
release-documentation:
name: Build and Upload Release Documentation
runs-on: ubuntu-24.04
env:
upload: ${{ inputs.upload && !contains(inputs.release-version, 'rc') }}
steps:
- name: Checkout LLVM
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
- name: Setup Python env
uses: actions/setup-python@42375524e23c412d93fb67b49958b491fce71c38 # v5.4.0
with:
cache: 'pip'
cache-dependency-path: './llvm/docs/requirements.txt'
- name: Install Dependencies
run: |
sudo apt-get update
sudo apt-get install -y \
graphviz \
python3-github \
ninja-build \
texlive-font-utils
pip3 install --user -r ./llvm/docs/requirements.txt
- name: Build Documentation
env:
GITHUB_TOKEN: ${{ github.token }}
run: |
./llvm/utils/release/build-docs.sh -release "${{ inputs.release-version }}" -no-doxygen
- name: Create Release Notes Artifact
uses: actions/upload-artifact@65c4c4a1ddee5b72f698fdd19549f0f0fb45cf08 # 4.6.0
with:
name: release-notes
path: docs-build/html-export/
- name: Clone www-releases
if: env.upload
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
with:
repository: ${{ github.repository_owner }}/www-releases
ref: main
fetch-depth: 0
path: www-releases
persist-credentials: false
- name: Upload Release Notes
if: env.upload
env:
GH_TOKEN: ${{ secrets.WWW_RELEASES_TOKEN }}
run: |
mkdir -p www-releases/${{ inputs.release-version }}
mv ./docs-build/html-export/* www-releases/${{ inputs.release-version }}
cd www-releases
git checkout -b ${{ inputs.release-version }}
git add ${{ inputs.release-version }}
git config user.email "llvmbot@llvm.org"
git config user.name "llvmbot"
git commit -a -m "Add ${{ inputs.release-version }} documentation"
git push --force "https://$GH_TOKEN@github.com/llvmbot/www-releases.git" HEAD:refs/heads/${{ inputs.release-version }}
gh pr create -f -B main -H ${{ inputs.release-version }} -R llvmbot/www-releases