↗️ Create Version Bump PR For Ruby Gems & NPM Packages #9
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: "Create Version Bump PR For Ruby Gems & NPM Packages" | |
on: | |
workflow_dispatch: | |
inputs: | |
versionBump: | |
description: 'Version Bump' | |
required: true | |
default: 'patch' | |
type: choice | |
options: | |
- patch | |
- minor | |
- major | |
permissions: | |
contents: write | |
pull-requests: write | |
jobs: | |
bump: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: "actions/checkout@v3" | |
- uses: "ruby/setup-ruby@v1" | |
with: | |
bundler-cache: true | |
ruby-version: 3.2 | |
- uses: "actions/setup-node@v3" | |
with: | |
node-version: '20.x' | |
registry-url: 'https://registry.npmjs.org' | |
- name: "Install bump" | |
run: gem install bump | |
- name: "Bump all" | |
id: bump-all | |
run: ./bin/bump-all ${{ inputs.versionBump }} | |
- name: "Create Pull Request" | |
id: cpr | |
uses: peter-evans/create-pull-request@v5 | |
with: | |
commit-message: "Version bump: ${{ inputs.versionBump }} - ${{ steps.bump-all.outputs.NEW_VERSION_NUMBER }}" | |
branch: "version-bump/${{ steps.bump-all.outputs.NEW_VERSION_NUMBER }}" | |
delete-branch: true | |
title: "Version bump: ${{ inputs.versionBump }} - ${{ steps.bump-all.outputs.NEW_VERSION_NUMBER }}" | |
add-paths: "bullet_train*,lib*,CHANGELOG.md" | |
body: | | |
Version bump of the `core` ruby gems and npm packages with a step of\: `${{ inputs.versionBump }}` | |
New version number: ${{ steps.bump-all.outputs.NEW_VERSION_NUMBER }} | |
Tag v${{ steps.bump-all.outputs.NEW_VERSION_NUMBER }} | |
- Auto-generated by [create-pull-request][1] | |
[1]: https://github.com/peter-evans/create-pull-request | |
labels: | | |
version bump | |
#reviewers: andreculver,jagthedrummer,pascallaliberte |