Skip to content

Commit cd76b10

Browse files
committed
feat: add release workflow for GitHub actions
1 parent c896c37 commit cd76b10

File tree

1 file changed

+26
-0
lines changed

1 file changed

+26
-0
lines changed

.github/workflows/release.yml

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
name: Release the Ansible role to Ansible Galaxy
2+
3+
on:
4+
push:
5+
tags:
6+
- "*"
7+
8+
jobs:
9+
release:
10+
runs-on: ubuntu-latest
11+
steps:
12+
- name: Checkout the current branch
13+
uses: actions/checkout@v4
14+
15+
- name: Setup of Python 3
16+
uses: actions/setup-python@v5
17+
with:
18+
python-version: "3.x"
19+
20+
- name: Install Ansible dependencies
21+
run: pip3 install ansible-core
22+
23+
- name: Release the Ansible role
24+
run: >-
25+
ansible-galaxy role import --api-key ${{ secrets.ANSIBLE_GALAXY_API_KEY }}
26+
$(echo ${{ github.repository }} | cut -d/ -f1) $(echo ${{ github.repository }} | cut -d/ -f2)

0 commit comments

Comments
 (0)