31 lines
782 B
YAML
31 lines
782 B
YAML
- name: Install .pypirc configuration file
|
|
template:
|
|
dest: ~/.pypirc
|
|
mode: 0400
|
|
src: .pypirc.j2
|
|
|
|
- name: Find wheels to upload
|
|
find:
|
|
paths: "{{ pypi_path }}"
|
|
patterns: "*.whl"
|
|
register: found_wheels
|
|
|
|
- name: Upload wheel with twine before tarballs
|
|
command: "{{ pypi_twine_executable }} upload -r {{ pypi_repository }} {{ item.path }}"
|
|
with_items: "{{ found_wheels.files }}"
|
|
|
|
- name: Find tarballs to upload
|
|
find:
|
|
paths: "{{ pypi_path }}"
|
|
patterns: "*.tar.gz"
|
|
register: found_tarballs
|
|
|
|
- name: Upload tarballs with twine
|
|
command: "{{ pypi_twine_executable }} upload -r {{ pypi_repository }} {{ item.path }}"
|
|
with_items: "{{ found_tarballs.files }}"
|
|
|
|
- name: Delete .pypirc configuration file
|
|
file:
|
|
path: ~/.pyirc
|
|
state: absent
|