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

37 lines
839 B
YAML
Raw Normal View History

---
2020-10-13 13:52:48 +00:00
name: Publish
on:
release:
2020-10-13 14:04:06 +00:00
types:
- created
2020-10-13 13:52:48 +00:00
jobs:
publish:
name: Publish to galaxy
2020-10-13 16:01:43 +00:00
runs-on: ubuntu-latest
2020-10-13 13:52:48 +00:00
steps:
- name: Check out code
uses: actions/checkout@v2
2020-10-13 13:52:48 +00:00
- 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 -i 's/0.0.0/'$VERSION'/' galaxy.yml
2020-10-13 13:52:48 +00:00
cat galaxy.yml
# - name: Build and publish
# env:
# ANSIBLE_GALAXY_API_KEY: ${{ secrets.ANSIBLE_GALAXY_API_KEY }}
# run: |
# ansible-galaxy collection build
2020-10-13 13:52:48 +00:00
# ansible-galaxy collection publish *.tar.gz --api-key $ANSIBLE_GALAXY_API_KEY