Capistrano 3.7.0 and newer has three SCM plugins (Git/Subversion/Mercurial).
As the link above shows, it is also possible to provide a custom SCM plugin. The implementations of the default plugins would help you know the nuts and bolts.
# .tgz file to be extracted into releases (required)
set :tgz_archive, "path/to/archive.tar.gz"
#set :tgz_archive, ask("Enter the path to *.tar.gz")
# tar --strip-components option (default: 0)
set :tgz_strip_components, 0