This commit is contained in:
IronicBadger 2022-04-27 17:28:30 -04:00
parent 73afa91599
commit b689e118b0

31
.github/workflows/release.yml vendored Normal file
View File

@ -0,0 +1,31 @@
name: Release
'on':
push:
tags:
- '*'
env:
GALAXY_USERNAME: IronicBadger
jobs:
release:
name: Release
runs-on: ubuntu-latest
steps:
- name: Set up Python 3.
uses: actions/setup-python@v2
with:
python-version: '3.x'
- name: Install Ansible.
run: pip3 install ansible-core
# Galaxy uses CamelCase username but GitHub is all lowercase
# This concatenates the versions together to work with
# And triggers an import on Galaxy
- name: Trigger a new import on Galaxy.
run: >-
ansible-galaxy role import --api-key ${{ secrets.GALAXY_API_KEY }}
$(echo ${{ env.GALAXY_USERNAME }}) $(echo ${{ github.repository }} | cut -d/ -f2)