Skip to content

Commit

Permalink
Update version-bump.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
iseizuu authored Aug 25, 2024
1 parent 748c65f commit 00a79cd
Showing 1 changed file with 6 additions and 50 deletions.
56 changes: 6 additions & 50 deletions .github/workflows/version-bump.yml
Original file line number Diff line number Diff line change
@@ -1,59 +1,15 @@
name: Version Bump and Release

name: release
on:
push:
branches:
- main
workflow_dispatch:

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

- name: Set up Node.js
uses: actions/setup-node@v3
- uses: GoogleCloudPlatform/release-please-action@v2
with:
node-version: '18'

- name: Install dependencies
run: yarn install

- name: Bump version
run: |
yarn version --patch --no-commit-hooks --no-git-tag-version
- name: Get new version
id: new_version
run: |
NEW_VERSION=$(node -p -e "require('./package.json').version")
echo "NEW_VERSION=$NEW_VERSION" >> $GITHUB_ENV
- name: Commit and push changes
run: |
git config user.name "github-actions[bot]"
git config user.email "github-actions[bot]@users.noreply.github.com"
git add package.json yarn.lock
git commit -m "Bump version to ${{ env.NEW_VERSION }} [skip ci]"
git tag "v${{ env.NEW_VERSION }}"
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 ${{ env.NEW_VERSION }}"
title: "Bump version to ${{ env.NEW_VERSION }}"
body: "This PR bumps the package version to ${{ env.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..."
# Customize this step to send notifications through email, Slack, or other channels.
token: ${{ secrets.GITHUB_TOKEN }}
release-type: node
package-name: release-please-action

0 comments on commit 00a79cd

Please sign in to comment.