Skip to content

👷 CI: New internal logic for the Open PR #15

👷 CI: New internal logic for the Open PR

👷 CI: New internal logic for the Open PR #15

name: 🤖 Automated Bump PR 🔖
on:
push:
branches:
- main
# -------------------------------------------------------------------------- #
# To use this Workflow, you need to specify this line on your job: #
# uses: ricardoleal20/sempyver/.github/workflows/open_pull_request.yml@main #
# -------------------------------------------------------------------------- #
workflow_call:
secrets:
CUSTOM_GITHUB_TOKEN:
description: "Token for be able to open Pull Requests and perform commits"
required: true
# Generate the jobs for this
jobs:
# Name of the main job for this
bump_and_open_pr:
runs-on: ubuntu-latest
steps:
# Check the code to see the differences
- name: Checkout code 🧑‍💻
uses: actions/checkout@v3
- name: Set up Python 🐍
uses: actions/setup-python@v2
with:
python-version: '3.10'
- name: Install dependencies 🏗️
run: |
pip install poetry
poetry install
poetry run pip install PyGithub
poetry run pip install maturin
poetry run maturin develop
- name: Perform changeset changes
run: |
poetry run sempyver bump
- name: Run Python script for open the new branch and the PR 🖥️
run: poetry run python .github/utilities/open_pr.py
env:
GITHUB_TOKEN: ${{ secrets.CUSTOM_GITHUB_TOKEN }}
BRANCH_NAME: ${{ github.ref }}
REPO_NAME: ${{ github.repository }}
- name: Add changed files with Git 🔍
run: |
git pull
git checkout bump-new-version
git add --all
git commit -m "🔖 Tag: Bump new project version using Sempyver"
git push
# If the linter pass
- run: echo "The PR has been open! ✅"