diff --git a/.github/workflows/upload-sdk-artifact.yml b/.github/workflows/upload-sdk-artifact.yml index b057a067e..685993dcf 100644 --- a/.github/workflows/upload-sdk-artifact.yml +++ b/.github/workflows/upload-sdk-artifact.yml @@ -4,7 +4,6 @@ on: push: branches: - master -on: pull_request: branches: - master @@ -82,6 +81,17 @@ jobs: ) - uses: actions/upload-artifact@v4 + if: github.event_name == 'push' with: name: sdk-${{ matrix.generator }}-${{ github.sha }} path: ./sdk + + cleanup-artifacts: + runs-on: ubuntu-latest + needs: + - generate-and-upload-sdk + if: github.event_name != 'push' + steps: + - uses: geekyeggo/delete-artifact@v5 + with: + name: swagger-*