From 71ff4f4b38e036aa4c5b65b66bc771b6fa742164 Mon Sep 17 00:00:00 2001 From: Markson Hon Date: Sun, 16 Jun 2024 21:18:32 +0800 Subject: [PATCH 1/3] ci: Fix prerelease && better uploading files --- .github/workflows/prerelease.yml | 13 ++++--------- .github/workflows/release.yml | 1 - 2 files changed, 4 insertions(+), 10 deletions(-) diff --git a/.github/workflows/prerelease.yml b/.github/workflows/prerelease.yml index eaa621715..bf7c715e5 100644 --- a/.github/workflows/prerelease.yml +++ b/.github/workflows/prerelease.yml @@ -71,8 +71,11 @@ jobs: echo "ASSET_NAME=$_NAME" >> $GITHUB_ENV - name: Set up Go - uses: actions/setup-go@v3 + uses: actions/setup-go@v5 with: + cache-dependency-path: | + go.mod + go.sum go-version: '^1.22' - name: Install Dependencies @@ -127,17 +130,9 @@ jobs: echo "$(shasum -a 256 $FILE)"" sha256" >> $FILE.dgst echo "$(shasum -a 512 $FILE)"" sha512" >> $FILE.dgst -# - name: Upload full source to Artifacts -# if: matrix.goarch == 'arm64' -# uses: actions/upload-artifact@v4 -# with: -# name: dae-full-src.zip -# path: dae-full-src.zip - - name: Upload files to Artifacts uses: actions/upload-artifact@v4 with: - name: dae-${{ steps.get_filename.outputs.ASSET_NAME }}.zip path: ./*.zip* upload-release: diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 7e11160dc..9f4c8135d 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -133,7 +133,6 @@ jobs: - name: Upload files to Artifacts uses: actions/upload-artifact@v4 with: - name: dae-${{ steps.get_filename.outputs.ASSET_NAME }}.zip path: ./*.zip* upload-release: From 3b08a67e92b2bdd8c39f784ec228a688afcb6bf2 Mon Sep 17 00:00:00 2001 From: Markson Hon Date: Sun, 16 Jun 2024 21:30:12 +0800 Subject: [PATCH 2/3] ci: Fix uploading files ci: update action-gh-release to v2 ci: update action-gh-release to v2 --- .github/workflows/prerelease.yml | 19 ++++++++----------- .github/workflows/release.yml | 13 +++++++++---- 2 files changed, 17 insertions(+), 15 deletions(-) diff --git a/.github/workflows/prerelease.yml b/.github/workflows/prerelease.yml index bf7c715e5..96e88835c 100644 --- a/.github/workflows/prerelease.yml +++ b/.github/workflows/prerelease.yml @@ -131,9 +131,14 @@ jobs: echo "$(shasum -a 512 $FILE)"" sha512" >> $FILE.dgst - name: Upload files to Artifacts - uses: actions/upload-artifact@v4 + uses: nanoufo/action-upload-artifacts-and-release-assets@v2 with: - path: ./*.zip* + if-no-files-found: ignore + path: | + dae-${{ steps.get_filename.outputs.ASSET_NAME }}.zip + dae-${{ steps.get_filename.outputs.ASSET_NAME }}.zip.dgst + dae-full-src.zip + dae-full-src.zip.dgst upload-release: needs: [build] @@ -151,16 +156,8 @@ jobs: echo "Show files are going to upload..." ls -lh | grep ".zip" - - name: Upload full source to GitHub release - uses: softprops/action-gh-release@v1 - with: - tag_name: ${{ inputs.tag }} - files: | - dae-full-src.zip - prerelease: true - - name: Upload full source and artifacts to GitHub release - uses: softprops/action-gh-release@v1 + uses: softprops/action-gh-release@v2 with: tag_name: ${{ inputs.tag }} files: | diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 9f4c8135d..526e0b19f 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -131,9 +131,14 @@ jobs: echo "$(shasum -a 512 $FILE)"" sha512" >> $FILE.dgst - name: Upload files to Artifacts - uses: actions/upload-artifact@v4 + uses: nanoufo/action-upload-artifacts-and-release-assets@v2 with: - path: ./*.zip* + if-no-files-found: ignore + path: | + dae-${{ steps.get_filename.outputs.ASSET_NAME }}.zip + dae-${{ steps.get_filename.outputs.ASSET_NAME }}.zip.dgst + dae-full-src.zip + dae-full-src.zip.dgst upload-release: needs: [build] @@ -152,14 +157,14 @@ jobs: ls -lh | grep ".zip" - name: Upload full source to GitHub release - uses: softprops/action-gh-release@v1 + uses: softprops/action-gh-release@v2 with: tag_name: ${{ inputs.tag }} files: | dae-full-src.zip - name: Upload full source and artifacts to GitHub release - uses: softprops/action-gh-release@v1 + uses: softprops/action-gh-release@v2 with: tag_name: ${{ inputs.tag }} files: | From 85221e17429d791636afe1b0970a93f6f2113589 Mon Sep 17 00:00:00 2001 From: Markson Hon Date: Sun, 16 Jun 2024 21:43:45 +0800 Subject: [PATCH 3/3] ci: update action-gh-release to v2 --- .github/workflows/release.yml | 7 ------- 1 file changed, 7 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 526e0b19f..caa59621e 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -156,13 +156,6 @@ jobs: echo "Show files are going to upload..." ls -lh | grep ".zip" - - name: Upload full source to GitHub release - uses: softprops/action-gh-release@v2 - with: - tag_name: ${{ inputs.tag }} - files: | - dae-full-src.zip - - name: Upload full source and artifacts to GitHub release uses: softprops/action-gh-release@v2 with: