forked from delphix/virtualization-sdk
-
Notifications
You must be signed in to change notification settings - Fork 0
42 lines (38 loc) · 1.23 KB
/
publish-python-packages.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
name: Publish Python packages to Test PyPi
on:
# Run on push when the version file has changed on selected branches.
push:
branches:
- master
- develop
- 'release/**'
paths:
- 'dvp/src/main/python/dlpx/virtualization/VERSION'
jobs:
publish:
runs-on: ubuntu-latest
strategy:
max-parallel: 5
matrix:
python-version: [2.7]
package: [common, dvp, libs, platform, tools]
steps:
- uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
# Install dependencies necessary for building and publishing the package.
- name: Install dependencies
run: |
pip install setuptools wheel twine
# Build each Python package and publish it to Test PyPi.
- name: Build and publish ${{ matrix.package }} package
working-directory: ${{ matrix.package }}
env:
TWINE_USERNAME: __token__
TWINE_PASSWORD: ${{ secrets.VSDK_PYPI_TOKEN }}
TWINE_REPOSITORY_URL: https://test.pypi.org/legacy/
run: |
python setup.py sdist bdist_wheel
twine upload dist/*