diff --git a/.github/workflows/bump-stage-and-upload-to-jfrog.yml b/.github/workflows/bump-stage-and-upload-to-jfrog.yml index a15a084be..b797b9ffb 100644 --- a/.github/workflows/bump-stage-and-upload-to-jfrog.yml +++ b/.github/workflows/bump-stage-and-upload-to-jfrog.yml @@ -51,6 +51,11 @@ jobs: version: ${{ needs.promote-dev-build-to-rc.outputs.new_version }} secrets: inherit + # See reason for deleting artifacts in dev-workflow-p2.yml + delete-artifacts: + needs: upload-rc-artifacts-to-jfrog + uses: ./.github/workflows/delete-artifacts.yml + ff-dev-to-stage: name: Fast forward dev branch to stage branch to include the bump to RC commit needs: promote-dev-build-to-rc diff --git a/.github/workflows/delete-artifacts.yml b/.github/workflows/delete-artifacts.yml new file mode 100644 index 000000000..21a13b6cd --- /dev/null +++ b/.github/workflows/delete-artifacts.yml @@ -0,0 +1,11 @@ +on: + workflow_call: + +jobs: + delete-artifacts: + runs-on: ubuntu-22.04 + steps: + - name: Remove artifacts with dev version + uses: geekyeggo/delete-artifact@v5 + with: + name: '*.build' diff --git a/.github/workflows/dev-workflow-p2.yml b/.github/workflows/dev-workflow-p2.yml index 0d6edb86a..2234ce10f 100644 --- a/.github/workflows/dev-workflow-p2.yml +++ b/.github/workflows/dev-workflow-p2.yml @@ -36,3 +36,8 @@ jobs: with: version: ${{ needs.bump-dev-number.outputs.new_version }} secrets: inherit + + # We don't want the artifacts in JFrog to also exist in Github + delete-artifacts: + needs: upload-to-jfrog + uses: ./.github/workflows/delete-artifacts.yml diff --git a/.github/workflows/stage-to-master.yml b/.github/workflows/stage-to-master.yml index 821410427..fc69f256e 100644 --- a/.github/workflows/stage-to-master.yml +++ b/.github/workflows/stage-to-master.yml @@ -51,6 +51,14 @@ jobs: packages-dir: artifacts/ password: ${{ secrets.PYPI_API_TOKEN }} + # See reason for deleting artifacts in dev-workflow-p2.yml + delete-artifacts: + needs: [ + upload-to-jfrog, + publish-to-pypi + ] + uses: ./.github/workflows/delete-artifacts.yml + fast-forward-stage-to-master: needs: build-artifacts uses: ./.github/workflows/fast-forward-merge.yml