-
Notifications
You must be signed in to change notification settings - Fork 5
30 lines (28 loc) · 950 Bytes
/
bump.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
name: Version Bump
on:
create:
branches:
workflow_dispatch:
jobs:
makepr:
name: make pr
runs-on: ubuntu-latest
if: ${{ contains(github.ref, 'release/') }}
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
- name: Install poetry
run: pip install poetry
- name: Bump version
run: git branch --show-current | sed 's|release/||' | xargs poetry version | { printf '::set-output name=PR_TITLE::'; cat; }
id: bump
- name: Bump version 2
run: git branch --show-current | sed 's|release/||' | xargs -I {} echo '__version__ = "{}"' > pams/version.py
- name: Create pull request
uses: peter-evans/create-pull-request@v3
with:
author: GitHub Actions <[email protected]>
commit-message: ${{ steps.bump.outputs.PR_TITLE }}
delete-branch: true
branch-suffix: short-commit-hash
title: ${{ steps.bump.outputs.PR_TITLE }}