From 1f9332e7a09c4e39a86892946382cbafab5445c0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Danny=20B=C3=A9dard?= Date: Tue, 20 Aug 2024 10:11:48 -0400 Subject: [PATCH] ci: Add Ansible Galaxy publishing workflow --- .github/workflows/galaxy_publish.yml | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 .github/workflows/galaxy_publish.yml diff --git a/.github/workflows/galaxy_publish.yml b/.github/workflows/galaxy_publish.yml new file mode 100644 index 0000000..dfe5841 --- /dev/null +++ b/.github/workflows/galaxy_publish.yml @@ -0,0 +1,26 @@ +name: Build and publish to Ansible Galaxy + +on: + push: + workflow_dispatch: + +jobs: + build: + environment: publish + runs-on: ubuntu-latest + + steps: + - name: Checkout code + uses: actions/checkout@v4 + + - name: Build + run: ansible-galaxy collection build + + - name: Publish to Ansible Galaxy + run: ansible-galaxy collection publish *.tar.gz --api-key ${{ secrets.ANSIBLE_GALAXY_TOKEN }} + + - name: Upload Artifact + uses: actions/upload-artifact@v4 + with: + name: ansible-dvls-collection + path: '*.tar.gz'