Skip to content

Commit 00a79cd

Browse files
authored
Update version-bump.yml
1 parent 748c65f commit 00a79cd

File tree

1 file changed

+6
-50
lines changed

1 file changed

+6
-50
lines changed

.github/workflows/version-bump.yml

+6-50
Original file line numberDiff line numberDiff line change
@@ -1,59 +1,15 @@
1-
name: Version Bump and Release
2-
1+
name: release
32
on:
43
push:
54
branches:
65
- main
7-
workflow_dispatch:
86

97
jobs:
10-
bump-version:
8+
release-please:
119
runs-on: ubuntu-latest
1210
steps:
13-
- name: Checkout repository
14-
uses: actions/checkout@v3
15-
16-
- name: Set up Node.js
17-
uses: actions/setup-node@v3
11+
- uses: GoogleCloudPlatform/release-please-action@v2
1812
with:
19-
node-version: '18'
20-
21-
- name: Install dependencies
22-
run: yarn install
23-
24-
- name: Bump version
25-
run: |
26-
yarn version --patch --no-commit-hooks --no-git-tag-version
27-
28-
- name: Get new version
29-
id: new_version
30-
run: |
31-
NEW_VERSION=$(node -p -e "require('./package.json').version")
32-
echo "NEW_VERSION=$NEW_VERSION" >> $GITHUB_ENV
33-
34-
- name: Commit and push changes
35-
run: |
36-
git config user.name "github-actions[bot]"
37-
git config user.email "github-actions[bot]@users.noreply.github.com"
38-
git add package.json yarn.lock
39-
git commit -m "Bump version to ${{ env.NEW_VERSION }} [skip ci]"
40-
git tag "v${{ env.NEW_VERSION }}"
41-
git push --follow-tags
42-
43-
- name: Create a pull request for the new version
44-
uses: peter-evans/create-pull-request@v5
45-
with:
46-
branch: bump-version
47-
commit-message: "Bump version to ${{ env.NEW_VERSION }}"
48-
title: "Bump version to ${{ env.NEW_VERSION }}"
49-
body: "This PR bumps the package version to ${{ env.NEW_VERSION }}."
50-
labels: version-bump
51-
52-
notify-users:
53-
needs: bump-version
54-
runs-on: ubuntu-latest
55-
steps:
56-
- name: Send notification to users
57-
run: |
58-
echo "Sending notification to users about the new version..."
59-
# Customize this step to send notifications through email, Slack, or other channels.
13+
token: ${{ secrets.GITHUB_TOKEN }}
14+
release-type: node
15+
package-name: release-please-action

0 commit comments

Comments
 (0)