diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 1395b83..622a583 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -183,7 +183,6 @@ jobs: cat clang-tidy-${{ env.suffix }}.sha512sum cat clang-apply-replacements-${{ env.suffix }}.sha512sum - name: Upload artifacts - if: github.event_name != 'pull_request' uses: actions/upload-artifact@v4 with: name: clang-tools-${{ matrix.release }}-${{ env.suffix }} @@ -191,30 +190,27 @@ jobs: retention-days: 1 draft-release: runs-on: ubuntu-22.04 - if: github.event_name != 'pull_request' needs: build steps: - - name: Download artifacts - uses: actions/download-artifact@v4 - with: - path: clang-tools-artifacts - merge-multiple: true - - name: list files - run: ls -laR clang-tools-artifacts - - name: Delete all files over 2G # see issue 40 - run: find clang-tools-artifacts -type f -size +2G -exec rm -v {} \; - name: Checkout code uses: actions/checkout@v4 - name: Get short SHA - id: sha + id: get-sha run: echo "short_sha=${GITHUB_SHA:0:8}" >> $GITHUB_OUTPUT - - name: Create draft release and upload assets + - name: Download artifacts + uses: actions/download-artifact@v4 + - name: List files + run: ls -laR . + - name: Workaround - delete all files over 2G, above github release file upload limit + run: find . -type f -size +2G -exec rm -v {} \; + - name: Draft release env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - run: | - RELEASE_TAG="master-${{ steps.sha.outputs.short_sha }}" - gh release create "$RELEASE_TAG" \ - clang-tools-artifacts\* \ - --title "$RELEASE_TAG" \ - --notes "Draft release of prebuilt clang tools" \ - --draft + uses: svenstaro/upload-release-action@v2 + with: + repo_token: ${{ secrets.GITHUB_TOKEN }} + release_name: master-${{ steps.get-sha.outputs.short_sha }} + tag: master-${{ steps.get-sha.outputs.short_sha }} + draft: true + file_glob: true + file: clang-*/**/*