I tried to solve the equations of motion using the action for the electromagnetic field interacting with a current, like $$ L = F_{\mu\nu}F^{\mu\nu} + A_{\nu}j^{\nu} $$ getting the right Maxwell's equations. I got curious and tried to figure alone a symmetry for local changes on the potential $A$, obtaining that the transformation $$ A_{\mu} \rightarrow A'_{\mu} = A_{\mu} + \partial_{\mu}\theta $$ doesn't change the electromagnetic tensor (and so, nothing else).
So I remembered reading somewhere about Noether theorem and that gauge invariance implies charge conservation. So I tried to make a direct substitution on the action: $$ S = \int \left( F_{\mu\nu}F^{\mu\nu} + A_{\nu}j^{\nu} \right) dx^4$$ being that the Faraday tensor doesn't change, and hence doesn't change the quadratic form, the only problematic element is the interaction of the field and the current, being after the transformation of the potential: $$ A_{\nu}j^{\nu} + \partial_{\nu}\theta j^{\nu} $$ The first part is the same as before, while on the second part I use the fact that $\theta$ is a differentiable field and $j$ a distribution (I will assume that it's integrable over all the space and compact), so that $$ \partial_{\nu}\theta j^{\nu} = - \theta \partial_{\nu}j^{\nu} $$
Now, I know that the continuity equation in the second member is zero, but that seems to be "a priori" of any kind of symmetry of the lagrangian.
So I guess, what is more fundamental, gauge invariance of charge conservation? and how do I correctly derive one from another?