forked from ansible/awx
-
Notifications
You must be signed in to change notification settings - Fork 0
56 lines (46 loc) · 1.33 KB
/
release.yml
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
name: Release AWX
on:
workflow_dispatch:
inputs:
version:
description: 'Version'
required: true
default: ''
confirm:
description: 'Are you sure? Set this to yes.'
required: true
default: 'no'
jobs:
release:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: "Verify inputs"
run: |
set -e
if [[ ${{ github.event.inputs.confirm }} != "yes" ]]; then
>&2 echo "Confirm must be 'yes'"
exit 1
fi
if [[ ${{ github.event.inputs.version }} == "" ]]; then
>&2 echo "Set version to continue."
exit 1
fi
exit 0
- name: Generate changelog
uses: shanemcd/simple-changelog-generator@v1
id: changelog
with:
repo: "${{ github.repository }}"
- name: Write changelog to file
run: |
cat << 'EOF' > /tmp/changelog
${{ steps.changelog.outputs.changelog }}
EOF
- name: Release AWX
run: |
ansible-playbook -v tools/ansible/release.yml \
-e changelog_path=/tmp/changelog \
-e version=${{ github.event.inputs.version }} \
-e github_token=${{ secrets.GITHUB_TOKEN }} \
-e repo=${{ github.repository }}