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+ # This workflow combines the building by https://github.com/OpenStitching/stitching/blob/main/.github/workflows/python-publish.yml
2+ # with the new trusted publishing by https://github.com/marketplace/actions/pypi-publish
3+ name : Upload Python Package
4+
5+ on :
6+ release :
7+ types : [published]
8+
9+ permissions :
10+ contents : read
11+
12+ jobs :
13+ deploy :
14+ runs-on : ubuntu-latest
15+ environment :
16+ name : pypi
17+ url : https://pypi.org/p/stitching-headless
18+ permissions :
19+ id-token : write # IMPORTANT: this permission is mandatory for trusted publishing
20+ steps :
21+ - uses : actions/checkout@v3
22+ - name : Set up Python
23+ uses : actions/setup-python@v3
24+ with :
25+ python-version : ' 3.x'
26+ - name : Install dependencies
27+ run : |
28+ python -m pip install --upgrade pip
29+ pip install build
30+ - name : Modify setup.cfg for headless version
31+ run : |
32+ sed -i 's/name = stitching/name = stitching-headless/' setup.cfg
33+ sed -i 's/opencv-python/opencv-python-headless/' setup.cfg
34+ - name : Build package
35+ run : python -m build
36+ - name : Publish package distributions to PyPI
37+ uses : pypa/gh-action-pypi-publish@release/v1
You can’t perform that action at this time.
0 commit comments