-
Notifications
You must be signed in to change notification settings - Fork 5
49 lines (42 loc) · 1.29 KB
/
python-publish.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
name: Bump version workflow
on:
push:
branches:
- master
- release-action
# - main
jobs:
bump-version:
name: Bump package version
if: "!contains(github.event.head_commit.message, 'Bump version')"
runs-on: ubuntu-20.04
steps:
- name: actions/checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
token: ${{ secrets.ODA_BOT_SECRET }}
# persist-credentials: false
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install build bump2version
- name: Bump version
run: |
git config --global user.email "[email protected]"
git config --global user.name "ODA Release Bot"
bump2version patch --verbose --commit --tag
bump2version release --verbose --commit --tag
- name: Push changes
uses: ad-m/github-push-action@master
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
branch: ${{ github.ref }}
- name: Build package
run: python -m build
- name: Publish package
uses: pypa/gh-action-pypi-publish@27b31702a0e7fc50959f5ad993c78deac1bdfc29
with:
user: __token__
verify_metadata: false
password: ${{ secrets.PYPI_API_TOKEN }}