-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
47 additions
and
0 deletions.
There are no files selected for viewing
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
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. |