Skip to content

Manual Version Bump and Release #18

Manual Version Bump and Release

Manual Version Bump and Release #18

Workflow file for this run

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 }}