From d93fa262538457f220f33b7c1881d8d1b92037ff Mon Sep 17 00:00:00 2001 From: shenxianpeng Date: Fri, 23 May 2025 23:15:11 +0300 Subject: [PATCH 1/6] fix: update build.yml to fix publish --- .github/workflows/build.yml | 22 ++++++++-------------- 1 file changed, 8 insertions(+), 14 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 1395b83..e7e35cb 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -191,7 +191,7 @@ jobs: retention-days: 1 draft-release: runs-on: ubuntu-22.04 - if: github.event_name != 'pull_request' + # if: github.event_name != 'pull_request' needs: build steps: - name: Download artifacts @@ -203,18 +203,12 @@ jobs: 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 - run: echo "short_sha=${GITHUB_SHA:0:8}" >> $GITHUB_OUTPUT - - name: Create draft release and upload assets + - 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 }} + draft: true + file_glob: true + file: clang-*/**/* From 5f3b2d84ba97e4d1c8dea2801288522ce5cde5c4 Mon Sep 17 00:00:00 2001 From: shenxianpeng Date: Sat, 24 May 2025 22:43:09 +0300 Subject: [PATCH 2/6] fix: update build.yml --- .github/workflows/build.yml | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index e7e35cb..a326435 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -191,18 +191,14 @@ 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: 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 }} @@ -211,4 +207,4 @@ jobs: repo_token: ${{ secrets.GITHUB_TOKEN }} draft: true file_glob: true - file: clang-*/**/* + file: clang-*/**/* \ No newline at end of file From 741de5eca9fed7c32cfb2648e083c9b1ca918bdc Mon Sep 17 00:00:00 2001 From: shenxianpeng Date: Sun, 25 May 2025 23:03:26 +0300 Subject: [PATCH 3/6] fix: remove upload condition --- .github/workflows/build.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index a326435..21b0315 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 }} From fefd86ffcdb07ec2e837d94ed28cd6ace1b6df59 Mon Sep 17 00:00:00 2001 From: shenxianpeng Date: Mon, 26 May 2025 21:39:05 +0300 Subject: [PATCH 4/6] get release title and tag --- .github/workflows/build.yml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 21b0315..2335194 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -198,12 +198,19 @@ jobs: 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: Checkout code + uses: actions/checkout@v4 + - name: Get short SHA + id: sha + run: echo "short_sha=${GITHUB_SHA:0:8}" >> $GITHUB_OUTPUT - name: Draft release env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} uses: svenstaro/upload-release-action@v2 with: repo_token: ${{ secrets.GITHUB_TOKEN }} + release_name: master-${{ steps.sha.outputs.short_sha }} + tag: master-${{ steps.sha.outputs.short_sha }} draft: true file_glob: true file: clang-*/**/* \ No newline at end of file From 4bd335e742bd5061c1fd418e34e36d4cb9fd7dfb Mon Sep 17 00:00:00 2001 From: shenxianpeng Date: Tue, 27 May 2025 04:35:11 +0300 Subject: [PATCH 5/6] move get-sha to the top of job --- .github/workflows/build.yml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 2335194..40056a7 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -192,17 +192,17 @@ jobs: runs-on: ubuntu-22.04 needs: build steps: + - name: Checkout code + uses: actions/checkout@v4 + - name: Get short SHA + id: get-sha + run: echo "short_sha=${GITHUB_SHA:0:8}" >> $GITHUB_OUTPUT - 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: Checkout code - uses: actions/checkout@v4 - - name: Get short SHA - id: sha - run: echo "short_sha=${GITHUB_SHA:0:8}" >> $GITHUB_OUTPUT - name: Draft release env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} @@ -210,7 +210,7 @@ jobs: with: repo_token: ${{ secrets.GITHUB_TOKEN }} release_name: master-${{ steps.sha.outputs.short_sha }} - tag: master-${{ steps.sha.outputs.short_sha }} + tag: master-${{ steps.get-sha.outputs.short_sha }} draft: true file_glob: true file: clang-*/**/* \ No newline at end of file From 8fd132eee86bbfd43b87829ed82a1d4239ed4a49 Mon Sep 17 00:00:00 2001 From: shenxianpeng Date: Tue, 27 May 2025 09:52:10 +0300 Subject: [PATCH 6/6] Update build.yml --- .github/workflows/build.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 40056a7..622a583 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -209,8 +209,8 @@ jobs: uses: svenstaro/upload-release-action@v2 with: repo_token: ${{ secrets.GITHUB_TOKEN }} - release_name: master-${{ steps.sha.outputs.short_sha }} + release_name: master-${{ steps.get-sha.outputs.short_sha }} tag: master-${{ steps.get-sha.outputs.short_sha }} draft: true file_glob: true - file: clang-*/**/* \ No newline at end of file + file: clang-*/**/*