File tree Expand file tree Collapse file tree 1 file changed +67
-0
lines changed Expand file tree Collapse file tree 1 file changed +67
-0
lines changed Original file line number Diff line number Diff line change 1+ name : Publish Python 🐍 distribution 📦 to PyPI and TestPyPI
2+
3+ on :
4+ workflow_dispatch
5+
6+ jobs :
7+ build :
8+ name : Build distribution 📦
9+ runs-on : ubuntu-latest
10+
11+ steps :
12+ - uses : actions/checkout@v4
13+ with :
14+ persist-credentials : false
15+ - name : Set up Python
16+ uses : actions/setup-python@v5
17+ with :
18+ python-version : " 3.x"
19+
20+ - name : Install Node
21+ uses : actions/setup-node@v2
22+ with :
23+ node-version : ' 18'
24+
25+ - name : Install npm dependencies
26+ run : |
27+ cd js
28+ npm ci --verbose
29+ npm run build --verbose
30+
31+ - name : Install pypa/build
32+ run : >-
33+ python3 -m
34+ pip install
35+ build
36+ --user
37+ - name : Build a binary wheel and a source tarball
38+ run : python3 -m build
39+ - name : Store the distribution packages
40+ uses : actions/upload-artifact@v4
41+ with :
42+ name : python-package-distributions
43+ path : dist/
44+
45+ publish-to-testpypi :
46+ name : Publish Python 🐍 distribution 📦 to TestPyPI
47+ needs :
48+ - build
49+ runs-on : ubuntu-latest
50+
51+ environment :
52+ name : testpypi
53+ url : https://test.pypi.org/p/plotly
54+
55+ permissions :
56+ id-token : write # IMPORTANT: mandatory for trusted publishing
57+
58+ steps :
59+ - name : Download all the dists
60+ uses : actions/download-artifact@v4
61+ with :
62+ name : python-package-distributions
63+ path : dist/
64+ - name : Publish distribution 📦 to TestPyPI
65+ uses : pypa/gh-action-pypi-publish@release/v1
66+ with :
67+ repository-url : https://test.pypi.org/legacy/
You can’t perform that action at this time.
0 commit comments