-
Notifications
You must be signed in to change notification settings - Fork 0
48 lines (38 loc) · 1.05 KB
/
release-python.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: Release all versions to pip
on:
push:
branches:
- 'master'
paths:
- 'setup.py'
- 'README.md'
- '**.py'
- '.github/workflows/release-python.yml'
jobs:
build:
name: Build & release
runs-on: ubuntu-18.04
env:
VER_PYTHON: 3.8
APP: lnd-rpc
steps:
- uses: actions/[email protected]
- name: Set up Python
uses: actions/setup-python@v1
with:
python-version: ${{env.VER_PYTHON}}
- name: Install dependencies
run: python -m pip install --upgrade pip setuptools wheel twine
- name: Build all packages
run: |
for version in ./v*; do
echo
echo "Building package for ${version}…"
sed -i "s|^version =.*$|version = '${version#./v}'|g" setup.py
python setup.py sdist bdist_wheel
done
- name: Upload all packages
env:
TWINE_USERNAME: __token__
TWINE_PASSWORD: ${{secrets.TWINE_PASSWORD}}
run: twine upload --non-interactive dist/*