From 98dc50a9ed06f8c27cc6a4a529e19e43d59050cf Mon Sep 17 00:00:00 2001 From: Tunglies <77394545+Tunglies@users.noreply.github.com> Date: Sat, 21 Jun 2025 20:42:27 +0800 Subject: [PATCH] refactor: remove redundant steps for cleaning old release assets --- .github/workflows/autobuild.yml | 42 --------------------------------- 1 file changed, 42 deletions(-) diff --git a/.github/workflows/autobuild.yml b/.github/workflows/autobuild.yml index 89c630df7..53c0f4f0a 100644 --- a/.github/workflows/autobuild.yml +++ b/.github/workflows/autobuild.yml @@ -140,20 +140,6 @@ jobs: Created at ${{ env.BUILDTIME }}. EOF - - name: Remove old assets from release - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - TAG_NAME: ${{ env.TAG_NAME }} - run: | - VERSION=$(cat package.json | jq -r '.version') - assets=$(gh release view "$TAG_NAME" --json assets -q '.assets[].name' || true) - for asset in $assets; do - if [[ "$asset" != *"$VERSION"* ]]; then - echo "Deleting old asset: $asset" - gh release delete-asset "$TAG_NAME" "$asset" -y - fi - done - - name: Upload Release uses: softprops/action-gh-release@v2 with: @@ -390,20 +376,6 @@ jobs: echo "VERSION=$(cat package.json | jq '.version' | tr -d '"')" >> $GITHUB_ENV echo "BUILDTIME=$(TZ=Asia/Shanghai date)" >> $GITHUB_ENV - - name: Remove old assets from release - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - TAG_NAME: ${{ env.TAG_NAME }} - run: | - VERSION=$(cat package.json | jq -r '.version') - assets=$(gh release view "$TAG_NAME" --json assets -q '.assets[].name' || true) - for asset in $assets; do - if [[ "$asset" != *"$VERSION"* ]]; then - echo "Deleting old asset: $asset" - gh release delete-asset "$TAG_NAME" "$asset" -y - fi - done - - name: Upload Release uses: softprops/action-gh-release@v2 with: @@ -501,20 +473,6 @@ jobs: Rename-Item $file.FullName $newName } - - name: Remove old assets from release - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - TAG_NAME: ${{ env.TAG_NAME }} - run: | - VERSION=$(cat package.json | jq -r '.version') - assets=$(gh release view "$TAG_NAME" --json assets -q '.assets[].name' || true) - for asset in $assets; do - if [[ "$asset" != *"$VERSION"* ]]; then - echo "Deleting old asset: $asset" - gh release delete-asset "$TAG_NAME" "$asset" -y - fi - done - - name: Upload Release uses: softprops/action-gh-release@v2 with: