Skip to content

Commit

Permalink
Merge pull request #1 from roaldnefs/auto-galaxy-release
Browse files Browse the repository at this point in the history
  • Loading branch information
roaldnefs authored Dec 25, 2020
2 parents 5430923 + c2d7fb8 commit 21a192d
Showing 1 changed file with 38 additions and 0 deletions.
38 changes: 38 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
---
name: Release
on:
release:
types: [published]

env:
NAMESPACE: roaldnefs
COLLECTION_NAME: transip
ANSIBLE_GALAXY_TOKEN: ${{ secrets.ANSIBLE_GALAXY_TOKEN }}
ANSIBLE_FORCE_COLOR: 1

jobs:
release:
runs-on: ubuntu-latest
steps:

- name: Checkout code
uses: actions/checkout@v2

- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: 3.8

- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install ansible
- name: Build the collection
run: |
ansible-galaxy collection build
- name: Publish the collection
run: |
shopt -s extglob
ansible-galaxy collection publish ./${{env.NAMESPACE}}-${{env.COLLECTION_NAME}}-${GITHUB_REF/refs\/tags\/?(v)/}.tar.gz

0 comments on commit 21a192d

Please sign in to comment.