diff --git a/.oniro-ci/build-generic.yaml b/.oniro-ci/build-generic.yaml
index 2f677f8d6e90aace48cb310fc6ca7917e7c75dd0..8dbb59aca711ca044f870c4e4c6653dd96398614 100644
--- a/.oniro-ci/build-generic.yaml
+++ b/.oniro-ci/build-generic.yaml
@@ -394,6 +394,8 @@
   rules:
     # Publishing is done only for scheduled builds
     - if: '$CI_PIPELINE_SOURCE == "schedule"'
+    # Run the job when a tag is placed.
+    - if: '$CI_COMMIT_TAG'
     # For merge requests, the publishing is optional and can be triggered manually.
     - if: '$CI_PIPELINE_SOURCE == "merge_request_event"'
       when: manual