File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ name : Deploy on Production
2+
3+ on :
4+ workflow_dispatch :
5+ push :
6+ branches :
7+ - main
8+ # push:
9+ # tags:
10+ # - v*
11+
12+ jobs :
13+ build :
14+ name : Build Python package
15+ runs-on : ubuntu-latest
16+ environment : release
17+ steps :
18+ - name : Checkout code
19+ uses : actions/checkout@v3
20+ with :
21+ ref : main
22+
23+ - name : Install dependencies
24+ run : |
25+ python3 -m pip install --upgrade pip
26+ pip3 install -r requirements.txt
27+
28+ - name : Build Python wheel
29+ run : |
30+ python3 -m build
31+
32+ - name : Store the distribution packages
33+ uses : actions/upload-artifact@v4
34+ with :
35+ name : python-package-distributions
36+ path : dist/
37+
38+ publish-to-pypi :
39+ name : Publish to PyPI
40+ # if: startsWith(github.ref, 'refs/tags/')
41+ needs :
42+ - build
43+ runs-on : ubuntu-latest
44+ environment :
45+ name : pypi
46+ url : https://pypi.org/p/lara-sdk
47+ permissions :
48+ id-token : write
49+
50+ steps :
51+ - name : Download all the dists
52+ uses : actions/download-artifact@v4
53+ with :
54+ name : python-package-distributions
55+ path : dist/
56+ - name : Publish distribution to PyPI
57+ uses : pypa/gh-action-pypi-publish@release/v1
You can’t perform that action at this time.
0 commit comments