File tree Expand file tree Collapse file tree 1 file changed +57
-0
lines changed Expand file tree Collapse file tree 1 file changed +57
-0
lines changed Original file line number Diff line number Diff line change 1+ name : Upload Python Package
2+
3+ on :
4+ release :
5+ types : [created]
6+
7+ jobs :
8+ deploy :
9+ runs-on : ubuntu-latest
10+ steps :
11+ - uses : actions/checkout@v3
12+ with :
13+ fetch-depth : 0
14+
15+ - name : Run semver-diff
16+ id : semver-diff
17+ uses :
tj-actions/[email protected] 18+
19+ - name : Set up Python
20+ uses : actions/setup-python@v4
21+ with :
22+ python-version : ' 3.7.x'
23+
24+ - name : Upgrade pip
25+ run : |
26+ pip install -U pip
27+
28+ - name : Install dependencies
29+ run : make install-deploy
30+
31+ - name : Setup git
32+ run : |
33+ git config --local user.email "github-actions[bot]@users.noreply.github.com"
34+ git config --local user.name "github-actions[bot]"
35+
36+ - name : bumpversion
37+ run : |
38+ make increase-version PART="${{ steps.semver-diff.outputs.release_type }}"
39+
40+ - name : Build and publish
41+ run : make release
42+ env :
43+ TWINE_USERNAME : ${{ secrets.PYPI_USERNAME }}
44+ TWINE_PASSWORD : ${{ secrets.PYPI_PASSWORD }}
45+
46+ - name : Generate CHANGELOG
47+ uses :
tj-actions/[email protected] 48+
49+ - name : Create Pull Request
50+ uses : peter-evans/create-pull-request@v4
51+ with :
52+ base : " main"
53+ title : " Upgraded ${{ steps.semver-diff.outputs.old_version }} → ${{ steps.semver-diff.outputs.new_version }}"
54+ branch : " chore/upgrade-${{ steps.semver-diff.outputs.old_version }}-to-${{ steps.semver-diff.outputs.new_version }}"
55+ commit-message : " Upgraded from ${{ steps.semver-diff.outputs.old_version }} → ${{ steps.semver-diff.outputs.new_version }}"
56+ body : " View [CHANGES](https://github.com/${{ github.repository }}/compare/${{ steps.semver-diff.outputs.old_version }}...${{ steps.semver-diff.outputs.new_version }})"
57+ token : ${{ secrets.PAT_TOKEN }}
You can’t perform that action at this time.
0 commit comments