awx/tools/ansible/release.yml

22 lines
565 B
YAML

---
- hosts: localhost
connection: local
vars:
payload:
body: "{{ lookup('file', changelog_path) | replace('\\n', '\n') }}"
name: "{{ version }}"
tag_name: "{{ version }}"
draft: true
tasks:
- name: Publish 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