Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 32 additions & 0 deletions .github/workflows/release-doxygen.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,36 @@ on:
required: true

jobs:
# This job checks permissions and validates inputs to prevent potential
# malicious actions. Since the release-doxygen job has contents: write
# permissions we need to be extra careful about who can run the job and
# what inputs can be provided.
release-doxygen-validate-input:
name: Release Doxygen Validate Input

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I suggest to only run this in the LLVM repository.

Suggested change
name: Release Doxygen Validate Input
name: Release Doxygen Validate Input
if: github.repository == 'llvm/llvm-project'

runs-on: ubuntu-24.04
environment:
name: release
deployment: false
permissions:
contents: read
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
persist-credentials: false
sparse-checkout: |
.github/workflows/

- name: Check Permissions
uses: ./.github/workflows/require-release-manager
with:
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
./.github/workflows/validate-release-version
Comment thread
kwk marked this conversation as resolved.
with:
release-version: ${{ inputs.release-version }}

release-doxygen:
name: Build and Upload Release Doxygen

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same here, only run this in the LLVM repo.

Suggested change
name: Build and Upload Release Doxygen
name: Build and Upload Release Doxygen
if: github.repository == 'llvm/llvm-project'

runs-on: ubuntu-24.04
Expand All @@ -42,6 +72,8 @@ jobs:
deployment: false
permissions:
contents: write
needs:
- release-doxygen-validate-input
env:
upload: ${{ inputs.upload && !contains(inputs.release-version, 'rc') }}
steps:
Expand Down
15 changes: 15 additions & 0 deletions .github/workflows/validate-release-version/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
name: Validate Release String
description: >-
This checks to make sure that the given release-version string is well formed.
inputs:
release-version:
required: true

runs:
using: "composite"
steps:
- env:
RELEASE_VERSON: ${{ inputs.release-version }}

run: |
grep -e '^[0-9]\+\.[0-9]\+\.[0-9]\+\(-rc[0-9]\+\)\?$' <<< "$RELEASE_VERSION"
Loading