Human-robot collaboration provides a great solution to the complex hybrid assembly tasks of intelligent manufacturing. In order to augment and guarantee the task quality in the human-robot collaboration process, the collaboration efficiency, including time consumption and human efforts, should be considered in the robot action planning. In this study, we propose a novel and practical approach using cost functions for the robot to plan actions in human-robot collaboration to address this challenge. By this approach, the robot action planning can be dynamically optimized to determine assisted assembly steps in the human-robot co-assembly task. A preliminary experiment is conducted to evaluate the proposed approach. Experimental results suggest that the proposed approach successfully generates the optimal actions for the robot to improve the task efficiency in human-robot collaboration.