Skip to content

Commit 227e64e

Browse files
authored
Add title and tag for draft release (#48)
1 parent 56fa89d commit 227e64e

File tree

1 file changed

+25
-17
lines changed

1 file changed

+25
-17
lines changed

.github/workflows/build.yml

Lines changed: 25 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -91,27 +91,27 @@ jobs:
9191
RELEASE: '${{ matrix.release }}'
9292
suffix: '${{ matrix.clang-version }}_${{ matrix.os }}-amd64'
9393
steps:
94-
- name: download patches
94+
- name: Download patches
9595
# We download a tarball of this repo, as the presence of a .git directory leaks
9696
# The commit hash of this repository into the clang binaries
9797
shell: bash
9898
run: curl -L https://github.com/${{ github.repository }}/archive/${{ github.ref }}.tar.gz | tar xvz --strip 1
99-
- name: get llvm-project
99+
- name: Get llvm-project
100100
if: ${{ matrix.clang-version == 8 }}
101101
shell: bash
102102
run: |
103103
version=${RELEASE##llvm-project-}
104104
curl -LO https://github.com/llvm/llvm-project/releases/download/llvmorg-${version}/llvm-${version}.src.tar.xz
105105
curl -LO https://github.com/llvm/llvm-project/releases/download/llvmorg-${version}/cfe-${version}.src.tar.xz
106106
curl -LO https://github.com/llvm/llvm-project/releases/download/llvmorg-${version}/clang-tools-extra-${version}.src.tar.xz
107-
- name: get llvm-project
107+
- name: Get llvm-project
108108
if: ${{ matrix.clang-version >= 9 || matrix.clang-version == '12.0.1' }}
109109
shell: bash
110110
run: |
111111
version=${RELEASE##llvm-project-}; version=${version%.src}
112112
curl -LO https://github.com/llvm/llvm-project/releases/download/llvmorg-${version}/${{ matrix.release }}.tar.xz
113113
114-
- name: unpack llvm-project
114+
- name: Unpack llvm-project
115115
if: ${{ matrix.clang-version < 9 }}
116116
shell: bash
117117
run: |
@@ -123,40 +123,40 @@ jobs:
123123
mv llvm-${version}.src ${{ matrix.release }}/llvm
124124
mv cfe-${version}.src ${{ matrix.release }}/clang
125125
mv clang-tools-extra-${version}.src ${{ matrix.release }}/clang-tools-extra
126-
- name: unpack llvm-project
126+
- name: Unpack llvm-project
127127
if: ${{ matrix.clang-version >= 9 || matrix.clang-version == '12.0.1' }}
128128
shell: bash
129129
run: |
130130
tar xf ${{ matrix.release }}.tar.xz ${{ matrix.extra-tar-args }}
131-
- name: patch clang-8 includes
131+
- name: Patch clang-8 includes
132132
if: ${{ matrix.clang-version == 8 }}
133133
shell: bash
134134
run: patch ${{ matrix.release }}/llvm/include/llvm/Demangle/MicrosoftDemangleNodes.h include-cstdint-string-prior-to-using-uint8_t.patch
135-
- name: patch trivially-copyable clang 9/10
135+
- name: Patch trivially-copyable clang 9/10
136136
if: ${{ ( matrix.clang-version == 9 || matrix.clang-version == 10 ) && matrix.os == 'windows' }}
137137
shell: bash
138138
run: patch ${{ matrix.release }}/llvm/cmake/config-ix.cmake windows-clang-9-10-trivially-copyable-mismatch.patch
139-
- name: patch cmake implicit link libraries on macOS
139+
- name: Patch cmake implicit link libraries on macOS
140140
if: ${{ matrix.os == 'macosx' }}
141141
shell: bash
142142
run: |
143143
sed -i.backup 's/gcc_eh.\*|/gcc_eh.*|gcc_ext.*|/g' "$(find /opt/homebrew/Cellar -name CMakeParseImplicitLinkInfo.cmake)"
144144
brew install gcc@11
145-
- name: update homebrew
145+
- name: Update homebrew
146146
if: ${{ matrix.os == 'macosx' && matrix.clang-version >= '18' }}
147147
shell: bash
148148
run: |
149149
brew update
150150
brew upgrade
151151
brew cleanup
152-
- name: cmake
152+
- name: CMake
153153
run: cmake -S ${{ matrix.release }}/llvm -B ${{ matrix.release }}/build ${{ env.COMMON_CMAKE_ARGS }} ${{ matrix.os-cmake-args }} ${{ matrix.extra-cmake-args }}
154-
- name: build
154+
- name: Build
155155
run: cmake --build ${{ matrix.release }}/build ${{ matrix.build-args }} --target clang-format clang-query clang-tidy clang-apply-replacements
156-
- name: print dependencies
156+
- name: Print dependencies
157157
if: ${{ matrix.os == 'macosx' }}
158158
run: otool -L ${{ matrix.release }}/build/bin/clang-format
159-
- name: rename output binary and test
159+
- name: Rename output binary and test
160160
run: |
161161
cd ${{ matrix.release }}${{ matrix.bindir }}
162162
mv clang-format${{ matrix.dotexe }} clang-format-${{ env.suffix }}${{ matrix.dotexe }}
@@ -168,7 +168,7 @@ jobs:
168168
./clang-query-${{ env.suffix }}${{ matrix.dotexe }} --version
169169
./clang-tidy-${{ env.suffix }}${{ matrix.dotexe }} --version
170170
./clang-apply-replacements-${{ env.suffix }}${{ matrix.dotexe }} --version
171-
- name: create and print sha512sum
171+
- name: Create and print sha512sum
172172
shell: bash
173173
run: |
174174
cd ${{ matrix.release }}${{ matrix.bindir }}
@@ -181,7 +181,7 @@ jobs:
181181
cat clang-query-${{ env.suffix }}.sha512sum
182182
cat clang-tidy-${{ env.suffix }}.sha512sum
183183
cat clang-apply-replacements-${{ env.suffix }}.sha512sum
184-
- name: upload artifacts
184+
- name: Upload artifacts
185185
if: ${{ github.actor != 'dependabot[bot]' }} || github.event_name != 'pull_request'
186186
uses: actions/upload-artifact@v4
187187
with:
@@ -193,16 +193,24 @@ jobs:
193193
if: ${{ github.actor != 'dependabot[bot]' }} || github.event_name != 'pull_request'
194194
needs: build
195195
steps:
196-
- name: download artifacts
196+
- name: Download artifacts
197197
uses: actions/download-artifact@v4
198198
- name: list files
199199
run: ls -laR .
200200
- name: Delete all files over 2G # see issue 40
201201
run: find . -type f -size +2G -exec rm -v {} \;
202-
- name: draft release
202+
- name: Checkout code
203+
uses: actions/checkout@v4
204+
- name: Get short SHA
205+
id: sha
206+
run: echo "short_sha=${GITHUB_SHA:0:8}" >> $GITHUB_OUTPUT
207+
- name: Draft release
203208
uses: svenstaro/upload-release-action@v2
204209
with:
210+
release_name: "master-${{ steps.sha.outputs.short_sha }}"
211+
tag: "master-${{ steps.sha.outputs.short_sha }}"
205212
repo_token: ${{ secrets.GITHUB_TOKEN }}
206213
draft: true
214+
overwrite: true
207215
file_glob: true
208216
file: clang-*/**/*

0 commit comments

Comments
 (0)