Auto-release

pull/1/head
cidrblock 2020-10-13 06:52:48 -07:00
parent 729f441e57
commit dadc33dc55
2 changed files with 36 additions and 3 deletions

34
.github/workflows/publish.yml vendored Normal file
View File

@ -0,0 +1,34 @@
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

View File

@ -8,6 +8,5 @@ description: Ansible Collection with utilities to ease the management, manipulat
readme: README.md
repository: https://github.com/ansible-collections/ansible.utils
tags: [networking, security, cloud, utilities, data, validation]
# NOTE(pabelanger): We create an empty version key to keep ansible-galaxy
# happy. We dynamically inject version info based on git information.
version: null
# this will be updated by a gh action prior to push
version: {{ version }}