Assume that a particle is shot upwards with an initial velocity of $v_0$ at $t = 0$. It then experiences a linear drag force of the form $F_\text{drag} = - \alpha v$, where $\alpha$ is a constant of proportionality. The equation of motion is then
$$
F_\text{grav} + F_\text{drag} = ma \quad \Rightarrow \quad - m g - \alpha v = m \frac{dv}{dt} \quad \Rightarrow \quad \frac{dv}{dt} = -g - \frac{\alpha}{m} v.
$$
This is a separable differential equation, and can be re-arranged and integrated:
\begin{align*}
- \frac{dv}{g + \alpha v/m} &= dt \\
- \frac{m}{\alpha} \int_{v_0}^v \frac{dv'}{mg/\alpha + v'} &= \int_{0}^t dt' \\
\ln \left[ v' + \frac{mg}{\alpha} \right]_{v_0}^v &= - \frac{\alpha t}{m} \\
\frac{v + mg/\alpha}{v_0 + mg/\alpha} &= e^{-\alpha t/m}
\end{align*}
$$
\boxed{v(t) = \left( v_0 + \frac{mg}{\alpha} \right) e^{-\alpha t/m} - \frac{mg}{\alpha} }
$$
The solution for $x(t)$ can be then be found by integrating this once more with respect to time. This method can also be used to find the behavior of projectiles under more realistic forms of drag force, such as quadratic drag; the integrals are just a bit harder.
Alternately, if you a relationship between $v$ and $x$, you can use the chain rule to re-write the above equation as
$$
\frac{dv}{dx} \frac{dx}{dt} = - g - \frac{\alpha}{m} v \quad \Rightarrow \quad
\frac{dv}{dx} v = - g - \frac{\alpha}{m} v
$$
Following the same logic, we then get
\begin{align*}
- \frac{m}{\alpha} \int_{v_0}^v \frac{v' dv'}{mg/\alpha + v'} &= \int_{0}^x dx' \\
\left[ v' - \frac{mg}{\alpha} \ln \left( v' + \frac{mg}{\alpha} \right) \right]_{v_0}^v &= - \frac{\alpha x}{m} \\
v - v_0 - \frac{mg}{\alpha} \ln \left( \frac{ v + mg/\alpha}{v_0 + mg/\alpha} \right) &= - \frac{\alpha x}{m}
\end{align*}
This equation can't be solved exactly to obtain $v$ as a function of $x$ (because of the presence of both logarithmic and polynomial terms), but you could figure out the speed at any height using numerical root-finding techniques; you could also solve for the maximum height by setting $v = 0$ and finding the corresponding $x$. And, as before, this technique could be adapted to other forms of the drag force such as quadratic drag.