-
Notifications
You must be signed in to change notification settings - Fork 45
81 lines (69 loc) · 1.92 KB
/
release.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
---
name: Release workflow
on:
push:
tags:
- "*"
paths-ignore:
- "**.md"
env:
ROLE_NAME: christiangda.amazon_cloudwatch_agent
GALAXY_ROLE_NAME: amazon_cloudwatch_agent
defaults:
run:
working-directory: "christiangda.amazon_cloudwatch_agent"
jobs:
release:
name: "Python ${{ matrix.python }} - Ansible ${{ matrix.ansible }}"
runs-on: ubuntu-latest
strategy:
matrix:
python: [3.9]
ansible: [">=4.1"]
steps:
- name: Check out the codebase.
uses: actions/checkout@v3
with:
path: ${{ env.ROLE_NAME }}
- name: Set up Python ${{ matrix.python }}
uses: actions/setup-python@v4
with:
python: ${{ matrix.python }}
- name: Upgrade pip
run: |
python -m pip install --upgrade pip
- name: Install ansible ${{ matrix.ansible }} and dependencies
env:
ANSIBLE_VERSION: ${{ matrix.ansible }}
run: |
pip install ansible"$ANSIBLE_VERSION"
- name: Show versions
run: |
ansible --version
python -VV
- name: Submit Ansible Galaxy Release
run: |
ansible-galaxy role import \
--api-key ${{ secrets.ANSIBLE_GALAXY_API_KEY }} \
--role-name $GALAXY_ROLE_NAME \
--branch master \
${{ github.repository_owner }} $GALAXY_ROLE_NAME
create_github_release:
name: Create Github Release
needs: release
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Create Release
id: create_github_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ github.ref }}
release_name: ${{ github.ref }}
body: |
See the file: CHANGELOG.md
draft: false
prerelease: false