I figured out, the --branch
option is used for the galaxy-ng version. So if you are on your latest release tag on the main
or master
branch, you can run:
ansible-galaxy role import \
--api-key <GalaxyAPIKey> \
--branch <YourGitReleaseTag> \
github_username github_repo
I created a github action, that can import new ansible role release with the correct set version to galaxy.ng: Action Ansible Galaxy Release · Actions · GitHub Marketplace · GitHub
It is using the GITHUB_REF_NAME
enviroment variable as version name.
I created a post about this topic here: