-
-
Notifications
You must be signed in to change notification settings - Fork 2k
69 lines (68 loc) · 2.24 KB
/
autobump.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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
name: Bump Version
on:
pull_request:
types: [closed]
jobs:
bumpversion:
runs-on: ubuntu-latest
if: github.event.pull_request.merged_at != null
strategy:
max-parallel: 1
steps:
- name: Wait for status checks
id: waitforstatuschecks
uses: "fcurella/gh-status-check@main"
with:
ignoreContexts: coverage/coveralls,continuous-integration/appveyor/branch
ignoreActions: autobump
checkInterval: 12
githubToken: ${{ secrets.GITHUB_TOKEN }}
- name: Get Next Part
id: nextpart
if: steps.waitforstatuschecks.outputs.status == 'success'
uses: "fcurella/gh-action-label-to-semver@main"
with:
major: "bump-version:major"
minor: "bump-version:minor"
defaultPart: "patch"
githubToken: ${{ secrets.GITHUB_TOKEN }}
- uses: actions/checkout@v4
with:
fetch-depth: 0 # otherwise, you will failed to push refs to dest repo
- name: Get Next Version
uses: "fcurella/gh-action-next-version@main"
id: nextversion
with:
part: ${{ steps.nextpart.outputs.part }}
- name: Update Changelog
uses: "fcurella/gh-action-update-changelog@main"
with:
changelogPath: "CHANGELOG.md"
changelogLine : 3
currentVersion: ${{ steps.nextversion.outputs.currentVersion }}
nextVersion: ${{ steps.nextversion.outputs.nextVersion }}
- name: Bump version
uses: "fcurella/gh-action-bump2version@main"
with:
part: ${{ steps.nextpart.outputs.part }}
- name: Push changes
uses: ad-m/github-push-action@master
with:
tags: true
github_token: ${{ secrets.GITHUB_TOKEN }}
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.x'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install setuptools wheel
- name: Build package
run: |
python setup.py sdist bdist_wheel
- name: Publish package
uses: pypa/gh-action-pypi-publish@master
with:
user: __token__
password: ${{ secrets.pypi_password }}