1
0
mirror of https://github.com/ansible/awx.git synced 2024-10-28 10:55:30 +03:00
awx/tools/ansible/stage.yml
2021-11-19 02:22:45 +00:00

23 lines
622 B
YAML

---
- hosts: localhost
connection: local
vars:
changelog_path: ''
payload:
body: "{{ (lookup('file', changelog_path) | replace('\\n', '\n')) if changelog_path else '' }}"
name: "{{ version }}"
tag_name: "{{ version }}"
draft: true
tasks:
- name: Publish draft Release
uri:
url: "https://api.github.com/repos/{{ repo }}/releases"
method: "POST"
headers:
Accept: "application/vnd.github.v3+json"
Authorization: "Bearer {{ github_token }}"
body: "{{ payload | to_json }}"
status_code:
- 200
- 201