-
-
Notifications
You must be signed in to change notification settings - Fork 2
70 lines (59 loc) · 1.61 KB
/
release-package.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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
name: Package Release
on:
release:
types: [published]
jobs:
pypi-release:
name: "Release"
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version:
- '3.9'
package:
- dsw-command-queue
- dsw-config
- dsw-database
- dsw-models
- dsw-storage
- dsw-tdk
steps:
- name: Check out repository
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
cache: pip
cache-dependency-path: |
**/pyproject.toml
**/requirements*.txt
- name: Prepare Python env
run: |
python -m pip install -U pip setuptools wheel
- name: Create build info
run: |
bash scripts/build-info.sh
- name: Build package sdist
run: |
cd packages/${{ matrix.package }}
python setup.py sdist
- name: Build package bdist (wheel)
run: |
cd packages/${{ matrix.package }}
python setup.py bdist_wheel
- name: Publish to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
user: __token__
password: ${{ secrets.PYPI_API_TOKEN }}
packages_dir: packages/${{ matrix.package }}/dist
print_hash: true
verbose: true
skip_existing: true
- name: Upload release assets
uses: shogo82148/actions-upload-release-asset@v1
with:
upload_url: ${{ github.event.release.upload_url }}
asset_path: packages/${{ matrix.package }}/dist/*