-
Notifications
You must be signed in to change notification settings - Fork 30
46 lines (40 loc) · 1.34 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
# Automatic check for updates, if new version is available, submit a pull request
# to update the version number in .github/workflows/build.yml
name: autobump
on:
schedule:
- cron: "35 4 * * *"
push:
paths:
- .github/workflows/autobump.yml
jobs:
autobump:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
# only check for head commit
ref: main
- name: Set up Python 3.11
uses: actions/setup-python@v4
with:
python-version: 3.11
- name: Install pip dependencies
run: |
python -m pip install --upgrade pip
pip install requests semver
- name: Check for updates
id: check-update
# outputs: new_version (if new version is available)
run: python check-update.py
- name: Create pull request
uses: peter-evans/create-pull-request@v5
if: steps.check-update.outputs.new_version != ''
with:
token: ${{ secrets.CPR_TOKEN }}
commit-message: "Bump version to ${{ steps.check-update.outputs.new_version }}"
title: "Bump version to ${{ steps.check-update.outputs.new_version }}"
body: "Bump version to ${{ steps.check-update.outputs.new_version }}"
branch: autobump
branch-suffix: timestamp
delete-branch: true