File tree Expand file tree Collapse file tree 3 files changed +35
-2
lines changed Expand file tree Collapse file tree 3 files changed +35
-2
lines changed Original file line number Diff line number Diff line change 1+ ---
2+ name : Ansible Release # feel free to pick your own name
3+
4+ on :
5+ push :
6+ branches :
7+ - main
8+ paths :
9+ - ' galaxy.yml'
10+
11+ jobs :
12+ build :
13+ runs-on : ubuntu-latest
14+ steps :
15+ # Important: This sets up your GITHUB_WORKSPACE environment variable
16+ - uses : actions/checkout@v2
17+
18+ - name : building collection
19+ run : ./build_collection.sh
20+ shell : bash
21+
22+ - name : Generate release tag
23+ id : tag
24+ run : |
25+ echo "::set-output name=release_tag::Version_$(grep -oP '^version: \K.*' ./galaxy.yml)"
26+
27+ - name : Relase new version
28+ uses : softprops/action-gh-release@v1
29+ with :
30+ tag_name : ${{ steps.tag.outputs.release_tag }}
31+ files : ./releases/*.tar.gz
32+ ...
Original file line number Diff line number Diff line change 11#! /usr/bin/env bash
22
3- ansible-galaxy collection build
3+
4+ ansible-galaxy collection build --output-path ./releases
Original file line number Diff line number Diff line change @@ -4,5 +4,5 @@ if [ $# -ne 1 ]; then
44 echo " usage: ${0} <file.tar.gz>"
55 exit 1
66fi
7- ansible-galaxy collection publish ${1} -s inbound-redhat_cop
7+ ansible-galaxy collection publish ./releases/ ${1} -s inbound-redhat_cop
88rm -rf ${1}
You can’t perform that action at this time.
0 commit comments