Manual Version Bump and Release #17
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: Manual Version Bump and Release | |
on: | |
workflow_dispatch: | |
inputs: | |
versionType: | |
description: 'Version type (major, minor, patch)' | |
required: true | |
default: 'patch' | |
jobs: | |
bump-version-and-release: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: Setup Node.js | |
uses: actions/setup-node@v4 | |
with: | |
cache: 'npm' | |
- name: Install dependencies | |
run: npm install | |
- name: Configure Git | |
run: | | |
git config user.name "github-actions" | |
git config user.email "[email protected]" | |
- name: Bump version and create tag | |
run: | | |
git config user.name "github-actions" | |
git config user.email "[email protected]" | |
VERSION=$(npm version ${{ github.event.inputs.versionType }}) | |
echo "new_version=$VERSION" >> $GITHUB_ENV | |
- name: Create Pull Request | |
uses: peter-evans/create-pull-request@v6 | |
with: | |
branch: ci-version-bump | |
title: "Bump version to ${{ env.new_version }}" | |
body: "This is an automated pull request to update the version." | |
token: ${{ secrets.G_TOKEN }} |