File tree Expand file tree Collapse file tree 1 file changed +46
-0
lines changed Expand file tree Collapse file tree 1 file changed +46
-0
lines changed Original file line number Diff line number Diff line change 3232 - name : run nox
3333 run : nox
3434 timeout-minutes : 10
35+
36+ build-dist :
37+ runs-on : ubuntu-20.04
38+ steps :
39+ - name : Fetch sources
40+ uses : actions/checkout@v3
41+ with :
42+ submodules : true
43+
44+ - name : Set up Python
45+ uses : actions/setup-python@v4
46+ with :
47+ python-version : " 3.10"
48+
49+ - name : Install build dependencies
50+ run : |
51+ python -m pip install -U pip
52+ python -m pip install -U build
53+
54+ - name : Build the source and binary distribution
55+ run : python -m build
56+
57+ - name : Upload dist files
58+ uses : actions/upload-artifact@v3
59+ with :
60+ name : frequenz-channels-python-dist
61+ path : dist/
62+ if-no-files-found : error
63+
64+ publish-to-pypi :
65+ needs : ["test", "build-dist"]
66+ # Publish only on tags creation
67+ if : github.event_name == 'push' && startsWith(github.ref, 'refs/tags')
68+ runs-on : ubuntu-20.04
69+ steps :
70+ - name : Download dist files
71+ uses : actions/download-artifact@v3
72+ with :
73+ name : frequenz-channels-python-dist
74+
75+ - name : Publish the Python distribution to PyPI
76+ uses : pypa/gh-action-pypi-publish@release/v1
77+ with :
78+ password : ${{ secrets.PYPI_API_TOKEN }}
79+ packages_dir : ./
80+ skip_existing : true
You can’t perform that action at this time.
0 commit comments