Skip to content

Commit

Permalink
feat: add auto version bump
Browse files Browse the repository at this point in the history
  • Loading branch information
iseizuu authored Aug 25, 2024
1 parent 81f8ddc commit cd43501
Showing 1 changed file with 47 additions and 0 deletions.
47 changes: 47 additions & 0 deletions .github/workflows/version-bump.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
name: Version Bump and Release

on:
push:
branches:
- main
workflow_dispatch:

jobs:
bump-version:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3

- name: Set up Node.js
uses: actions/setup-node@v3
with:
node-version: '16'

- name: Install dependencies
run: npm install

- name: Bump version and push
run: |
git config user.name "github-actions[bot]"
git config user.email "github-actions[bot]@users.noreply.github.com"
npm version patch -m "Bump version to %s [skip ci]"
git push --follow-tags
- name: Create a pull request for the new version
uses: peter-evans/create-pull-request@v5
with:
branch: bump-version
commit-message: "Bump version to ${{ steps.bump.outputs.new-version }}"
title: "Bump version to ${{ steps.bump.outputs.new-version }}"
body: "This PR bumps the package version to ${{ steps.bump.outputs.new-version }}."
labels: version-bump

notify-users:
needs: bump-version
runs-on: ubuntu-latest
steps:
- name: Send notification to users
run: |
echo "Sending notification to users about the new version..."
# You can customize this step to send notifications through email, Slack, or other channels.

0 comments on commit cd43501

Please sign in to comment.