We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent c2f38dd commit 2727d1fCopy full SHA for 2727d1f
.github/workflows/ansible-publish.yml
@@ -0,0 +1,31 @@
1
+name: Publish Collection to Ansible Galaxy
2
+
3
+on:
4
+ release:
5
+ types: [published]
6
7
+jobs:
8
+ publish:
9
+ runs-on: ubuntu-latest
10
+ steps:
11
+ - name: Check out repository
12
+ uses: actions/checkout@v3
13
14
+ - name: Set up Python
15
+ uses: actions/setup-python@v4
16
+ with:
17
+ python-version: '3.x'
18
19
+ - name: Install Ansible and dependencies
20
+ run: |
21
+ pip install ansible ansible-lint
22
23
+ - name: Build Ansible Collection
24
25
+ ansible-galaxy collection build --output-path ./dist
26
27
+ - name: Publish Collection
28
+ env:
29
+ ANSIBLE_GALAXY_API_KEY: ${{ secrets.ANSIBLE_GALAXY_API_KEY }}
30
31
+ ansible-galaxy collection publish dist/*.tar.gz --api-key "$ANSIBLE_GALAXY_API_KEY"
0 commit comments