workflows/release-documentation: Rework workflow to make it testable - #212689
Draft
tstellar wants to merge 1 commit into
Draft
workflows/release-documentation: Rework workflow to make it testable#212689tstellar wants to merge 1 commit into
tstellar wants to merge 1 commit into
Conversation
Removed the environment declaration from the validation job and split out the www-releases update into a separate job. This makes it safe and possible to add a pull_request trigger so we can at least test building the documentation when someone submits a pull request.
|
@llvm/pr-subscribers-github-workflow Author: Tom Stellard (tstellar) ChangesRemoved the environment declaration from the validation job and split out the www-releases update into a separate job. This makes it safe and possible to add a pull_request trigger so we can at least test building the documentation when someone submits a pull request. Full diff: https://github.com/llvm/llvm-project/pull/212689.diff 1 Files Affected:
diff --git a/.github/workflows/release-documentation.yml b/.github/workflows/release-documentation.yml
index a39d4dba87a5a..6ee08cb48a95f 100644
--- a/.github/workflows/release-documentation.yml
+++ b/.github/workflows/release-documentation.yml
@@ -38,6 +38,24 @@ on:
LLVM_TOKEN_GENERATOR_PRIVATE_KEY:
description: "Private key for our GitHub App we use for generating access tokens."
required: true
+ # Run on pull_requests for testing purposes.
+ pull_request:
+ paths:
+ - '.github/workflows/release-documentation.yml'
+ - 'llvm/utils/release/build-docs.sh'
+ types:
+ - opened
+ - synchronize
+ - reopened
+ # When a PR is closed, we still start this workflow, but then skip
+ # all the jobs, which makes it effectively a no-op. The reason to
+ # do this is that it allows us to take advantage of concurrency groups
+ # to cancel in progress CI jobs whenever the PR is closed.
+ - closed
+
+concurrency:
+ group: ${{ github.workflow }}-${{ inputs.release-version || github.event.pull_request.number }}
+ cancel-in-progress: True
jobs:
# This job checks permissions and validates inputs to prevent potential
@@ -47,9 +65,6 @@ jobs:
release-man-pages-validate-input:
name: Release Man Pages Validate Input
runs-on: ubuntu-24.04
- environment:
- name: release
- deployment: false
permissions:
contents: read
steps:
@@ -59,13 +74,6 @@ jobs:
sparse-checkout: |
.github/workflows/
- - name: Check Permissions
- uses: ./.github/workflows/require-team-membership
- with:
- team-slug: llvm-release-managers
- LLVM_TOKEN_GENERATOR_CLIENT_ID: ${{ secrets.LLVM_TOKEN_GENERATOR_CLIENT_ID }}
- LLVM_TOKEN_GENERATOR_PRIVATE_KEY: ${{ secrets.LLVM_TOKEN_GENERATOR_PRIVATE_KEY }}
-
- name: Validate Input
uses: ./.github/workflows/validate-release-version
with:
@@ -84,8 +92,6 @@ jobs:
man-page-tarball-name: ${{ steps.vars.outputs.man-page-tarball-name }}
man-page-upload: ${{ steps.vars.outputs.man-page-upload }}
man-page-attestation-name: ${{ steps.vars.outputs.man-page-attestation-name }}
- env:
- upload: ${{ inputs.upload && !contains(inputs.release-version, 'rc') }}
steps:
- name: Collect Variables
id: vars
@@ -155,8 +161,23 @@ jobs:
name: release-notes
path: docs-build/html-export/
+
+ upload-release-notes:
+ name: "Upload Release Notes"
+ runs-on: ubuntu-24.04
+ environment:
+ deployment: false
+ name: release
+ needs:
+ - release-documentation
+ if: >-
+ github.event_name != 'pull_request' &&
+ inputs.upload &&
+ !contains(inputs.release-version, 'rc')
+ permissions:
+ contents: read
+ steps:
- name: Clone www-releases
- if: env.upload
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
with:
repository: ${{ github.repository_owner }}/www-releases
@@ -166,7 +187,6 @@ jobs:
persist-credentials: false
- name: Upload Release Notes
- if: env.upload
env:
PUSH_TOKEN: ${{ secrets.LLVMBOT_WWW_RELEASES_PUSH }}
GH_TOKEN: ${{ secrets.WWW_RELEASES_TOKEN }}
|
tstellar
marked this pull request as draft
July 29, 2026 05:53
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Removed the environment declaration from the validation job and split out the www-releases update into a separate job. This makes it safe and possible to add a pull_request trigger so we can at least test building the documentation when someone submits a pull request.