|
1 | 1 | name: Release |
2 | 2 |
|
3 | | -env: |
4 | | - DIST_DIR: dist |
5 | | - |
6 | 3 | on: |
7 | 4 | push: |
8 | 5 | tags: |
|
80 | 77 | - name: upload artifacts |
81 | 78 | uses: actions/upload-artifact@v2 |
82 | 79 | with: |
83 | | - name: clang-${{ matrix.config.name }}-${{ matrix.config.arch }} |
| 80 | + name: clang_${{ matrix.config.name }}_${{ matrix.config.arch }} |
84 | 81 | path: | |
85 | 82 | ${{ needs.get-version.outputs.llvm-version }}${{ matrix.config.bindir }}/clangd${{ matrix.config.extension }} |
86 | 83 | ${{ needs.get-version.outputs.llvm-version }}${{ matrix.config.bindir }}/clang-format${{ matrix.config.extension }} |
@@ -146,28 +143,36 @@ jobs: |
146 | 143 | - name: upload artifacts |
147 | 144 | uses: actions/upload-artifact@v2 |
148 | 145 | with: |
149 | | - name: clang-${{ matrix.config.name }}-${{ matrix.config.arch }} |
| 146 | + name: clang_${{ matrix.config.name }}_${{ matrix.config.arch }} |
150 | 147 | path: | |
151 | 148 | ${{ needs.get-version.outputs.llvm-version }}/build/bin/clangd* |
152 | 149 | ${{ needs.get-version.outputs.llvm-version }}/build/bin/clang-format* |
153 | 150 |
|
154 | 151 | create-release: |
155 | 152 | runs-on: ubuntu-latest |
156 | | - needs: |
157 | | - - build-linux |
158 | | - - build-win-mac |
| 153 | + needs: [build-linux, build-win-mac, get-version] |
159 | 154 |
|
160 | 155 | steps: |
161 | 156 | - name: Download artifact |
162 | 157 | uses: actions/download-artifact@v2 |
163 | | - with: |
164 | | - path: ${{ env.DIST_DIR }} |
| 158 | + |
| 159 | + - name: Prepare artifacts for the release |
| 160 | + run: | |
| 161 | + mkdir release |
| 162 | + declare -a target_folders=("linux_amd64" "linux_386" "linux_arm64" "linux_arm" "darwin_amd64" "windows_386" "windows_amd64") |
| 163 | + for folder in "${target_folders[@]}" |
| 164 | + do |
| 165 | + chmod -v +x clang_$folder/* |
| 166 | + FILENAME=clang-${{ needs.get-version.outputs.tag }}-${folder}.tar.bz2 |
| 167 | + tar -cvjf $FILENAME clang_$folder/ |
| 168 | + done |
| 169 | + mv -v clang*.tar.bz2 release/ |
165 | 170 |
|
166 | 171 | - name: Create Github Release and upload artifacts |
167 | 172 | uses: ncipollo/release-action@v1 |
168 | 173 | with: |
169 | 174 | token: ${{ secrets.GITHUB_TOKEN }} |
170 | 175 | draft: false |
171 | 176 | # NOTE: "Artifact is a directory" warnings are expected and don't indicate a problem |
172 | | - # (all the files we need are in the DIST_DIR root) |
173 | | - artifacts: ${{ env.DIST_DIR }}/* |
| 177 | + # (all the files we need are in the release folder root) |
| 178 | + artifacts: release/* |
0 commit comments