Answer
$$y = \ln ( \sec x +c) $$
Work Step by Step
Given $$ e^{-y}\sin x -y'\cos^2x=0 $$
Then
$$y'= e^{-y}\sec x\tan x$$
Separate variables
\begin{align*}
\int e^ydy &= \int \sec x\tan x dx \\
e^y&= \sec x +c\\
y&= \ln ( \sec x +c)
\end{align*}