mirror of
https://github.com/clangd/clangd.git
synced 2025-04-21 08:03:00 +00:00
Allow using a different repository for the manual release
Extract the repository from the commit message. This will help us have more control over the release process.
This commit is contained in:
parent
d561d317fc
commit
3d45929b0a
16
.github/workflows/autobuild.yaml
vendored
16
.github/workflows/autobuild.yaml
vendored
@ -16,17 +16,28 @@ jobs:
|
|||||||
grep -m 1 -o "llvm-project@[[:xdigit:]]\{40,\}" << EOF | cut -f 2 -d@ > commit
|
grep -m 1 -o "llvm-project@[[:xdigit:]]\{40,\}" << EOF | cut -f 2 -d@ > commit
|
||||||
${{ github.event.release.body }}
|
${{ github.event.release.body }}
|
||||||
EOF
|
EOF
|
||||||
|
- name: Find Repository
|
||||||
|
run: |
|
||||||
|
grep -m 1 -o "\w*/llvm-project@[[:xdigit:]]\{40,\}" << EOF | cut -f 1 -d@ > repo
|
||||||
|
echo "LLVM_COMMIT=$(cat release/commit)" >> $GITHUB_ENV
|
||||||
|
${{ github.event.release.body }}
|
||||||
|
EOF
|
||||||
- name: Mark as draft
|
- name: Mark as draft
|
||||||
run: >
|
run: >
|
||||||
curl --fail --show-error -XPATCH
|
curl --fail --show-error -XPATCH
|
||||||
"-HAuthorization: Bearer ${{ secrets.RELEASE_TOKEN }}"
|
"-HAuthorization: Bearer ${{ secrets.RELEASE_TOKEN }}"
|
||||||
"https://api.github.com/repos/${{ github.repository }}/releases/${{ github.event.release.id }}"
|
"https://api.github.com/repos/${{ github.repository }}/releases/${{ github.event.release.id }}"
|
||||||
"-d" '{"draft": true}'
|
"-d" '{"draft": true}'
|
||||||
- name: Persist release info
|
- name: Persist release info for commit
|
||||||
uses: actions/upload-artifact@v1
|
uses: actions/upload-artifact@v1
|
||||||
with:
|
with:
|
||||||
name: release
|
name: release
|
||||||
path: commit
|
path: commit
|
||||||
|
- name: Persist release info for repository
|
||||||
|
uses: actions/upload-artifact@v1
|
||||||
|
with:
|
||||||
|
name: release
|
||||||
|
path: repo
|
||||||
# Build clangd using CMake/Ninja.
|
# Build clangd using CMake/Ninja.
|
||||||
#
|
#
|
||||||
# This step is a template that runs on each OS, build config varies slightly.
|
# This step is a template that runs on each OS, build config varies slightly.
|
||||||
@ -126,12 +137,13 @@ jobs:
|
|||||||
- name: Set target commit
|
- name: Set target commit
|
||||||
run: |
|
run: |
|
||||||
echo "LLVM_COMMIT=$(cat release/commit)" >> $GITHUB_ENV
|
echo "LLVM_COMMIT=$(cat release/commit)" >> $GITHUB_ENV
|
||||||
|
echo "LLVM_REPO=$(cat release/commit)" >> $GITHUB_ENV
|
||||||
echo "CLANGD_DIR=clangd_${{ github.event.release.tag_name }}" >> $GITHUB_ENV
|
echo "CLANGD_DIR=clangd_${{ github.event.release.tag_name }}" >> $GITHUB_ENV
|
||||||
shell: bash
|
shell: bash
|
||||||
- name: Clone LLVM
|
- name: Clone LLVM
|
||||||
uses: actions/checkout@v2
|
uses: actions/checkout@v2
|
||||||
with:
|
with:
|
||||||
repository: llvm/llvm-project
|
repository: ${{ env.LLVM_REPO }}
|
||||||
path: llvm-project
|
path: llvm-project
|
||||||
ref: ${{ env.LLVM_COMMIT }}
|
ref: ${{ env.LLVM_COMMIT }}
|
||||||
- name: CMake
|
- name: CMake
|
||||||
|
Loading…
Reference in New Issue
Block a user