-
Notifications
You must be signed in to change notification settings - Fork 52
46 lines (38 loc) · 1.26 KB
/
publish.pypi.ansible.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
name: Publish to PyPI (KSM Ansible)
on:
workflow_dispatch:
jobs:
publish-pypi:
name: Publish KSM Ansible Pulugin to PyPI
environment: prod
runs-on: ubuntu-latest
timeout-minutes: 10 # To keep builds from running too long
defaults:
run:
working-directory: ./integration/keeper_secrets_manager_ansible
steps:
- name: Get the source code
uses: actions/checkout@v3
- name: Set up Python 3.9
uses: actions/setup-python@v4
with:
python-version: 3.9
- name: Retrieve secrets from KSM
id: ksmsecrets
uses: Keeper-Security/ksm-action@master
with:
keeper-secret-config: ${{ secrets.KSM_PYPI_PUBLISHER_PYPI_SDK_CONFIG }}
secrets: |
-aBWi3-yU_qvatNh0Eaqew/field/password > PYPI_API_TOKEN
- name: Install dependencies
run: |
python3 -m pip install --upgrade setuptools pip wheel twine
python3 -m pip install -r requirements.txt
- name: Build and Publish
env:
TWINE_USERNAME: __token__
TWINE_PASSWORD: ${{ steps.ksmsecrets.outputs.PYPI_API_TOKEN }}
run: |
python3 setup.py build
python3 setup.py sdist
python3 -m twine upload --verbose dist/*