Version Bump #50
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 }} |