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 : Create Release on Version Change
2+
3+ on :
4+ push :
5+ branches :
6+ - main
7+ paths :
8+ - ' setup.py'
9+
10+ jobs :
11+ check-and-create-release :
12+ runs-on : ubuntu-latest
13+ steps :
14+ - uses : actions/checkout@v3
15+ with :
16+ fetch-depth : 2 # to check against previus releases
17+
18+ - name : Set up Python
19+ uses : actions/setup-python@v4
20+ with :
21+ python-version : ' 3.x'
22+
23+ - name : Extract Version
24+ id : get_version
25+ run : |
26+ VERSION=$(python setup.py --version)
27+ echo "version=$VERSION" >> $GITHUB_OUTPUT
28+
29+ - name : Create Release
30+ id : create_release
31+ uses : actions/create-release@v1
32+ env :
33+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
34+ with :
35+ tag_name : v${{ steps.get_version.outputs.version }}
36+ release_name : Release v${{ steps.get_version.outputs.version }}
37+ draft : false
38+ prerelease : false
You can’t perform that action at this time.
0 commit comments