brintos

brintos / llvm-project-archived public Read only

0
0
Text · 4.7 KiB · 199017a Raw
145 lines · yaml
1name: Release Task2 3permissions:4  contents: read5 6on:7  push:8    tags:9      # The regex support here is limited, so just match everything that starts with llvmorg- and filter later.10      - 'llvmorg-*'11 12jobs:13  validate-tag:14    name: Validate Tag15    runs-on: ubuntu-24.0416    if: github.repository == 'llvm/llvm-project'17    outputs:18      release-version: ${{ steps.validate-tag.outputs.release-version }}19    steps:20      - name: Validate Tag21        id: validate-tag22        run: |23          echo "${{ github.ref_name }}" | grep -e '^llvmorg-[0-9]\+\.[0-9]\+\.[0-9]\+\(-rc[0-9]\+\)\?$'24          release_version=$(echo "${{ github.ref_name }}" | sed 's/llvmorg-//g')25          echo "release-version=$release_version" >> "$GITHUB_OUTPUT"26 27  release-create:28    name: Create a New Release29    runs-on: ubuntu-24.0430    permissions:31      contents: write # For creating the release.32    needs: validate-tag33 34    steps:35      - name: Install Dependencies36        run: |37          sudo apt-get update38          sudo apt-get install python3-github39 40      - name: Checkout LLVM41        uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.042 43      - name: Create Release44        env:45          GITHUB_TOKEN: ${{ github.token }}46          USER_TOKEN: ${{ secrets.RELEASE_TASKS_USER_TOKEN }}47        run: |48          ./llvm/utils/release/./github-upload-release.py --token "$GITHUB_TOKEN" --release ${{ needs.validate-tag.outputs.release-version }} --user ${{ github.actor }} --user-token "$USER_TOKEN" create49  release-documentation:50    name: Build and Upload Release Documentation51    needs:52      - validate-tag53    uses: ./.github/workflows/release-documentation.yml54    with:55      release-version: ${{ needs.validate-tag.outputs.release-version }}56      upload: true57    # Called workflows don't have access to secrets by default, so we need to explicitly pass secrets that we use.58    secrets:59      WWW_RELEASES_TOKEN: ${{ secrets.WWW_RELEASES_TOKEN }}60 61  release-doxygen:62    name: Build and Upload Release Doxygen63    permissions:64      contents: write65    needs:66      - validate-tag67      - release-create68    uses: ./.github/workflows/release-doxygen.yml69    with:70      release-version: ${{ needs.validate-tag.outputs.release-version }}71      upload: true72    # Called workflows don't have access to secrets by default, so we need to explicitly pass secrets that we use.73    secrets:74      RELEASE_TASKS_USER_TOKEN: ${{ secrets.RELEASE_TASKS_USER_TOKEN }}75 76  release-lit:77    name: Release Lit78    needs: validate-tag79    uses: ./.github/workflows/release-lit.yml80    with:81      release-version: ${{ needs.validate-tag.outputs.release-version }}82    # Called workflows don't have access to secrets by default, so we need to explicitly pass secrets that we use.83    secrets:84      RELEASE_TASKS_USER_TOKEN: ${{ secrets.RELEASE_TASKS_USER_TOKEN }}85 86  release-binaries:87    name: Build Release Binaries88    permissions:89      contents: write90      id-token: write91      attestations: write92    needs:93      - validate-tag94      - release-create95    uses: ./.github/workflows/release-binaries-all.yml96    with:97      release-version: ${{ needs.validate-tag.outputs.release-version }}98      upload: true99    # Called workflows don't have access to secrets by default, so we need to explicitly pass secrets that we use.100    secrets:101      RELEASE_TASKS_USER_TOKEN: ${{ secrets.RELEASE_TASKS_USER_TOKEN }}102 103  release-sources:104    name: Package Release Sources105    permissions:106      contents: read107      id-token: write108      attestations: write109    needs:110      - validate-tag111    uses: ./.github/workflows/release-sources.yml112    with:113      release-version: ${{ needs.validate-tag.outputs.release-version }}114    # Called workflows don't have access to secrets by default, so we need to explicitly pass secrets that we use.115    secrets:116      RELEASE_TASKS_USER_TOKEN: ${{ secrets.RELEASE_TASKS_USER_TOKEN }}117 118  uncomment-download-links:119    name: Uncomment download links120    runs-on: ubuntu-24.04121    permissions:122      contents: write # For updating the release message.123    needs:124      - validate-tag125      - release-create126      - release-binaries127 128    steps:129      - name: Install Dependencies130        run: |131          sudo apt-get update132          sudo apt-get install python3-github133 134      - name: Checkout LLVM135        uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0136        with:137          sparse-checkout: llvm/utils/release/github-upload-release.py138          sparse-checkout-cone-mode: false139 140      - name: Uncomment Download Links141        env:142          GITHUB_TOKEN: ${{ github.token }}143        run: |144          ./llvm/utils/release/./github-upload-release.py --token "$GITHUB_TOKEN" --release ${{ needs.validate-tag.outputs.release-version }} uncomment_download_links145