Rules does not have any action for publish selected content
You can use drupal's hook_form_alter() for firing your PHP code. Check below example:

function contr_form_alter(&amp;$form, &amp;$form_state, $form_id) {
  if($form_id == 'node_admin_content'){
    $form['admin']['options']['submit']['#submit'][] = 'CUSTOM_SUBMIT_HANDLER';
  }
}


and then you can write your PHP code in CUSTOM_SUBMIT_HANDLER function as below:

function CUSTOM_SUBMIT_HANDLER($form, $form_state){
  if($form_state['values']['operation'] == 'publish'){
    // Do your stuff when PUBLISH here.
  }elseif ($form_state['values']['operation'] == 'unpublish') {
    // Do your stuff when UNPUBLISH here.    
  }
}