Skip to content

Release

Release #21

Workflow file for this run

name: Release
on:
workflow_dispatch:
inputs:
llvm_version:
description: "LLVM version (e.g. 21.1.0)"
required: true
type: string
# increment the release number if we publish multiple releases for the same llvm_version
release_number:
description: "Release number (will be suffixed to llvm_version)"
default: "1"
required: true
type: string
jobs:
create-release:
runs-on: ubuntu-22.04
outputs:
tag: ${{ steps.compute_tag.outputs.tag }}
upload_url: ${{ steps.create_release.outputs.upload_url }}
steps:
- uses: actions/checkout@v5
# ----------------------------------------------------------------------
- name: Compute tag
id: compute_tag
run: echo "tag=v${{ inputs.llvm_version }}-${{ inputs.release_number }}" >> "$GITHUB_OUTPUT"
# ----------------------------------------------------------------------
- name: Create Release
id: create_release
uses: softprops/action-gh-release@v2
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
name: ${{ steps.compute_tag.outputs.tag }}
tag_name: ${{ steps.compute_tag.outputs.tag }}
draft: true
prerelease: false
generate_release_notes: false
make_latest: false
llvm-linux:
needs: create-release
runs-on: [
'@id:llvm-linux-job-${{ github.run_id }}-${{ github.run_attempt }}',
# Older Ubuntu to build with a more ancient libc to support more platforms
'@image-family:ubuntu-2204-lts',
'@image-project:ubuntu-os-cloud',
'@disk-size:100',
'@keep-alive:false',
'@machine-type:n2-standard-48',
'@os:linux',
'@zone:northamerica-northeast1-b'
]
steps:
- uses: actions/checkout@v5
# ----------------------------------------------------------------------
- name: Build LLVM
run: bash build_llvm.sh ${{ inputs.llvm_version }} ${{ inputs.release_number }}
# ----------------------------------------------------------------------
- name: Upload Release
uses: softprops/action-gh-release@v2
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
name: ${{ needs.create-release.outputs.tag }}
tag_name: ${{ needs.create-release.outputs.tag }}
files: |
.llvm/linux-x64.tar.xz
.llvm/linux-x64.checksums.json
# Does not work for now on provided MacOS runners by GitHub
# llvm-macos:
# needs: create-release
# runs-on: macos-latest
# steps:
# - uses: actions/checkout@v5
# # ----------------------------------------------------------------------
# - name: Build LLVM
# run: bash build_llvm.sh ${{ inputs.llvm_version }} ${{ inputs.release_number }}
# # ----------------------------------------------------------------------
# - name: Upload Release
# uses: softprops/action-gh-release@v2
# env:
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# with:
# name: ${{ needs.create-release.outputs.tag }}
# tag_name: ${{ needs.create-release.outputs.tag }}
# files: |
# .llvm/macos-AArch64.tar.xz
# .llvm/macos-AArch64.checksums.json
llvm-windows:
needs: create-release
runs-on: [
'@id:llvm-windows-job-${{ github.run_id }}-${{ github.run_attempt }}',
'@image-family:windows-2022',
'@image-project:windows-cloud',
'@disk-size:100',
'@keep-alive:false',
'@machine-type:n2-standard-48',
'@os:windows',
'@zone:northamerica-northeast1-b'
]
steps:
- uses: actions/checkout@v5
# ----------------------------------------------------------------------
- name: Build LLVM
shell: pwsh
run: ./build_llvm.ps1 -Version ${{ inputs.llvm_version }} ${{ inputs.release_number }}
# ----------------------------------------------------------------------
- name: Upload Release
uses: softprops/action-gh-release@v2
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
name: ${{ needs.create-release.outputs.tag }}
tag_name: ${{ needs.create-release.outputs.tag }}
files: |
.llvm/windows-x64.tar.xz
.llvm/windows-x64.checksums.json
publish-release:
# needs: [create-release, llvm-linux, llvm-macos, llvm-windows]
needs: [create-release, llvm-linux, llvm-windows]
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v5
# ----------------------------------------------------------------------
- name: Make Release the latest one
id: create_release
uses: softprops/action-gh-release@v2
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
name: ${{ needs.create-release.outputs.tag }}
tag_name: ${{ needs.create-release.outputs.tag }}
draft: false
prerelease: false
generate_release_notes: true
make_latest: false
append_body: false