Custom Rules Actions to set content to unpublished Is there a way to write a custom Rules Action with this conditions.

Default: Content Type X is set to create unpublished content.

RULES

Event: After saving new content
Condition: when a content of type X is created
Action: Set status to published
Even though your Rules question could be like an exercise for a training session like "Getting started with Rules in D7", the most recent release of Rules for D8 (= Alfa 3) does not support this yet.

However, as a work-around, you could implement the very same logic if you'd adapt the configuration of your content type X so that the default is that newly created content is published right away.

Note: if your goal is to "let anonymous users access unpublished contents" (as in your comment below this answer), then the view_unpublished module could be a possible alternative. As per its project page: it allows you to grant access for specific user roles to view unpublished nodes of a specific type.