-
Notifications
You must be signed in to change notification settings - Fork 6
40 lines (37 loc) · 1.43 KB
/
bump-patch-version.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
name: Bump patch version
on:
push:
branches: [ npm ]
jobs:
build-tasks:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
ref: main
- name: Bump patch version
run: |
git config --global user.email "[email protected]"
git config --global user.name "GitHub Actions"
npm version patch
git status
package_version=`node -p "require('./package.json').version"`
echo "PACKAGE_VERSION=${package_version}" >> $GITHUB_ENV
shell: bash
- name: Create Bump patch version Pull Request
id: cpr
uses: peter-evans/create-pull-request@v7
with:
commit-message: 'ci: bump patch version to ${{ env.PACKAGE_VERSION }}'
committer: GitHub <[email protected]>
author: ${{ github.actor }} <${{ github.actor }}@users.noreply.github.com>
title: '[Release BOT] Bump patch version to ${{ env.PACKAGE_VERSION }}'
body: |
Bump patch version to ${{ env.PACKAGE_VERSION }}
- Auto-generated by `bump-patch-version.yml` action
- Triggered ad you pushed some changes to npm branch
- name: Check outputs
if: ${{ steps.cpr.outputs.pull-request-number }}
run: |
echo "Pull Request Number - ${{ steps.cpr.outputs.pull-request-number }}"
echo "Pull Request URL - ${{ steps.cpr.outputs.pull-request-url }}"