File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -11,15 +11,39 @@ name: Upload Python Package
1111on :
1212 release :
1313 types : [published]
14+ pull_request :
15+ types :
16+ - closed
1417
1518jobs :
19+ create-github-release :
20+ if : github.event.pull_request.merged == true
21+ runs-on : ubuntu-latest
22+ permissions : write-all
23+ steps :
24+ - name : Check out code
25+ uses : actions/checkout@v3
26+
27+ - name : Extract version from prismacloud/cli/version.py
28+ run : |
29+ version=$(grep 'version = ' prismacloud/api/version.py | sed -E "s/version = \"([^\"]+)\"/\1/")
30+ echo "PRISMA_CLOUD_API_VERSION=$version" >> $GITHUB_ENV
31+
32+ - name : Create GitHub Release
33+ run : |
34+ gh release create ${{ env.PRISMA_CLOUD_API_VERSION }} --generate-notes --latest
35+ env :
36+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
37+
1638 deploy :
1739 runs-on : ubuntu-latest
40+ needs :
41+ - create-github-release
1842
1943 steps :
2044 - uses : actions/checkout@v3
2145 - name : Set up Python
22- uses : actions/setup-python@v3
46+ uses : actions/setup-python@v4
2347 with :
2448 python-version : ' 3.9'
2549 - name : Install Dependencies
Original file line number Diff line number Diff line change 1- """ version file """
2-
3- version = '5.2.9'
1+ version = "5.2.9"
You can’t perform that action at this time.
0 commit comments