File tree Expand file tree Collapse file tree 5 files changed +277
-263
lines changed Expand file tree Collapse file tree 5 files changed +277
-263
lines changed Original file line number Diff line number Diff line change 11name : deploy-release
22
33on :
4- pull_request :
5- types : [closed]
6- branches : [main]
4+ workflow_dispatch :
5+ inputs :
6+ version :
7+ description : ' Version of this deployment'
8+ required : true
79
810jobs :
911 build_release :
10- if : |
11- ${{ github.event.pull_request.merged == true }}
12- && ${{ contains(github.event.pull_request.labels.*.name, 'release') }}
1312 name : Build Release
1413 runs-on : ubuntu-latest
1514 steps :
2423 python -m pip install --upgrade pip
2524 python -m pip install setuptools wheel
2625
27- - name : check-version
28- run : |
29- echo "VERSION=$(python setup.py --version)" >> $GITHUB_OUTPUT
30-
3126 - name : create python package
3227 run : python setup.py sdist bdist_wheel
3328
@@ -38,12 +33,11 @@ jobs:
3833 token : ${{ secrets.GITHUB_TOKEN }}
3934 draft : false
4035 generateReleaseNotes : true
41- tag : v ${{ steps.check-version.outputs.VERSION }}
36+ tag : ${{ github.event.inputs.version }}
4237 commit : main
4338
4439 - name : deploy
4540 uses : pypa/gh-action-pypi-publish@release/v1
4641 with :
4742 user : __token__
48- password : ${{ secrets.PYPI }}
49- repository_url : https://test.pypi.org/legacy/
43+ password : ${{ secrets.PYPI }}
Original file line number Diff line number Diff line change 1+ name : deploy-test-release
2+
3+ on :
4+ workflow_dispatch :
5+ inputs :
6+ version :
7+ description : ' Version of this deployment'
8+ required : true
9+
10+ jobs :
11+ build_release :
12+ name : Build Release
13+ runs-on : ubuntu-latest
14+ steps :
15+ - uses : actions/checkout@v3
16+ - name : Set up Python 3.10
17+ uses : actions/setup-python@v4
18+ with :
19+ python-version : " 3.10"
20+
21+ - name : Install dependencies
22+ run : |
23+ python -m pip install --upgrade pip
24+ python -m pip install setuptools wheel
25+
26+ - name : create python package
27+ run : python setup.py sdist bdist_wheel
28+
29+ - name : Create Release
30+ uses : ncipollo/release-action@v1
31+ with :
32+ artifacts : " dist/*"
33+ token : ${{ secrets.GITHUB_TOKEN }}
34+ draft : false
35+ generateReleaseNotes : true
36+ tag : ${{ github.event.inputs.version }}
37+ commit : main
38+
39+ - name : deploy
40+ uses : pypa/gh-action-pypi-publish@release/v1
41+ with :
42+ user : __token__
43+ password : ${{ secrets.PYPI }}
44+ repository_url : https://test.pypi.org/legacy/
You can’t perform that action at this time.
0 commit comments