36 lines
834 B
YAML
36 lines
834 B
YAML
name: Publish
|
|
on:
|
|
release:
|
|
types:
|
|
- created
|
|
|
|
jobs:
|
|
publish:
|
|
name: Publish to galaxy
|
|
runs-on: ubuntu-latest
|
|
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/0.0.0/'$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
|