ansible.utils/.github/workflows/publish.yml

35 lines
815 B
YAML

name: Publish
on:
release:
types:
- created
jobs:
publish:
name: Publish to galaxy
steps:
- name: Check out code
uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: 3.8
- name: Install ansible-base
run: pip install ansible-base
- name: Update the galaxy.yml with the release
env:
VERSION: ${{ github.event.release.tag_name }}
run: |
sed 's/{{ version }}/'$VERSION'/' galaxy.yml
cat galaxy.yml
# - name: Build and publish
# env:
# ANSIBLE_GALAXY_API_KEY: ${{ secrets.ANSIBLE_GALAXY_API_KEY }}
# run: |
# ansible-galaxy collection build
# ansible-galaxy collection publish *.tar.gz --api-key $ANSIBLE_GALAXY_API_KEY