Using workflow_dispatch for LLVM releases (#222)

This commit is contained in:
Yuri Volkov
2025-02-20 20:00:33 +01:00
committed by GitHub
parent 840a736fc5
commit 6ad7908c5e
2 changed files with 28 additions and 15 deletions
+24 -12
View File
@@ -1,9 +1,12 @@
name: Release LLVM name: Release LLVM
on: on:
push: workflow_dispatch:
tags: inputs:
- "llvm*" llvm_version:
type: string
required: true
description: llvm version in "x.x.x" format, e.g. "18.1.8"
env: env:
CARGO_TERM_COLOR: always CARGO_TERM_COLOR: always
@@ -13,13 +16,20 @@ jobs:
runs-on: ubuntu-latest runs-on: ubuntu-latest
permissions: permissions:
contents: write contents: write
outputs:
version: ${{ steps.resolve-version.outputs.version }}
steps: steps:
- id: resolve-version
run: |
echo "version=${{ inputs.llvm_version }}-revive.${GITHUB_SHA:0:7}" >> $GITHUB_OUTPUT
- name: create release - name: create release
uses: softprops/action-gh-release@v2 uses: softprops/action-gh-release@v2
with: with:
name: "LLVM binaries release: ${{ github.ref_name }}" name: "LLVM binaries release: ${{ steps.resolve-version.outputs.version }}"
body: "This release includes binaries of LLVM, used to compile revive itself" body: "This release includes binaries of LLVM, used to compile revive itself"
make_latest: "false" make_latest: "false"
tag_name: ${{ steps.resolve-version.outputs.version }}
build-macos: build-macos:
strategy: strategy:
@@ -68,14 +78,15 @@ jobs:
- name: package artifacts - name: package artifacts
run: | run: |
tar -czf "${{ github.ref_name }}-macos-${{ matrix.arch }}.tar.gz" target-llvm/gnu/target-final tar -czf "${{ needs.create-release.outputs.version }}-macos-${{ matrix.arch }}.tar.gz" target-llvm/gnu/target-final
- name: upload archive to release - name: upload archive to release
uses: softprops/action-gh-release@v2 uses: softprops/action-gh-release@v2
with: with:
make_latest: "false" make_latest: "false"
tag_name: ${{ needs.create-release.outputs.version }}
files: | files: |
${{ github.ref_name }}-macos-${{ matrix.arch }}.tar.gz ${{ needs.create-release.outputs.version }}-macos-${{ matrix.arch }}.tar.gz
build-linux-all: build-linux-all:
@@ -141,15 +152,16 @@ jobs:
- name: package artifacts - name: package artifacts
run: | run: |
tar -czf "${{ github.ref_name }}-x86_64-linux-gnu-linux.tar.gz" target-llvm/gnu/target-final tar -czf "${{ needs.create-release.outputs.version }}-x86_64-linux-gnu-linux.tar.gz" target-llvm/gnu/target-final
tar -czf "${{ github.ref_name }}-x86_64-linux-musl.tar.gz" target-llvm/musl/target-final tar -czf "${{ needs.create-release.outputs.version }}-x86_64-linux-musl.tar.gz" target-llvm/musl/target-final
tar -czf "${{ github.ref_name }}-wasm32-unknown-emscripten.tar.gz" target-llvm/emscripten/target-final tar -czf "${{ needs.create-release.outputs.version }}-wasm32-unknown-emscripten.tar.gz" target-llvm/emscripten/target-final
- name: upload archive to release - name: upload archive to release
uses: softprops/action-gh-release@v2 uses: softprops/action-gh-release@v2
with: with:
make_latest: "false" make_latest: "false"
tag_name: ${{ needs.create-release.outputs.version }}
files: | files: |
${{ github.ref_name }}-x86_64-linux-gnu-linux.tar.gz ${{ needs.create-release.outputs.version }}-x86_64-linux-gnu-linux.tar.gz
${{ github.ref_name }}-x86_64-linux-musl.tar.gz ${{ needs.create-release.outputs.version }}-x86_64-linux-musl.tar.gz
${{ github.ref_name }}-wasm32-unknown-emscripten.tar.gz ${{ needs.create-release.outputs.version }}-wasm32-unknown-emscripten.tar.gz
+4 -3
View File
@@ -11,6 +11,7 @@ To create a new pre-release:
# LLVM release # LLVM release
To create a new LLVM release, create a git tag (not GitHub release) with `llvm-` prefix, e.g. `llvm-0.0.11`. To create a new LLVM release, run "Release LLVM" workflow. Use current LLVM version as parameter, e.g. `18.1.8`.
`Release LLVM` action will start automatically. It will create new GitHub release, and upload LLVM binaries. Version suffix will be resolved automatically.
Other actions including Release will use these binaries on the next run. The workflows will create new GitHub release, and upload LLVM binaries.
Next release of resolc will use newly created binaries.