-
Notifications
You must be signed in to change notification settings - Fork 40
44 lines (38 loc) · 1.16 KB
/
update_dev_version.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
name: Update dev version automatically
on:
pull_request:
jobs:
update-dev-version:
name: Update version for development branches
runs-on: ubuntu-latest
steps:
- name: Checkout PennyLane-Lightning master
uses: actions/checkout@v3
with:
ref: master
path: main
- uses: actions/setup-python@v4
name: Install Python
with:
python-version: '3.8'
- name: Checkout PennyLane-Lightning PR
uses: actions/checkout@v3
with:
token: ${{ secrets.GITHUB_TOKEN }}
ref: ${{ github.head_ref }}
path: pr
- name: Run version update script
run: >
python3 pr/.github/workflows/dev_version_script.py
--pr-path "./pr" --master-path "./main"
- name: Commit and push changes
if:
run: |
cd ./pr
if [[ -n $(git status -s) ]]; then
git config --global user.email 'github-actions[bot]@users.noreply.github.com'
git config --global user.name "Dev version update bot"
git add .
git commit -m 'Auto update version'
git push
fi