Skip to content

Commit 076c870

Browse files
committed
ci: github action to bump minor version on push to prod branch
1 parent f9ba41b commit 076c870

File tree

1 file changed

+48
-0
lines changed

1 file changed

+48
-0
lines changed
Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
name: Bump minor version on prod push
2+
3+
on:
4+
push:
5+
branches: [ prod ]
6+
7+
jobs:
8+
build-tasks:
9+
runs-on: ubuntu-latest
10+
steps:
11+
- name: setup node
12+
uses: actions/setup-node@v3
13+
with:
14+
node-version: 20
15+
- uses: actions/checkout@v3
16+
with:
17+
ref: main
18+
- name: Bump patch version
19+
run: |
20+
npm ci
21+
npm run _minorVersionBump
22+
git status
23+
phoenix_version=`node -p "require('./package.json').apiVersion"`
24+
echo "PHOENIX_VERSION=${phoenix_version}" >> $GITHUB_ENV
25+
echo "SKIP_TEST_RUN_GITHUB=yes" >> $GITHUB_ENV
26+
shell: bash
27+
28+
- name: Create Bump patch version Pull Request
29+
id: cpr
30+
uses: peter-evans/create-pull-request@v4
31+
with:
32+
commit-message: 'ci: bump patch version to ${{ env.PHOENIX_VERSION }}'
33+
committer: GitHub <[email protected]>
34+
author: ${{ github.actor }} <${{ github.actor }}@users.noreply.github.com>
35+
title: '[Release BOT] Bump patch version to ${{ env.PHOENIX_VERSION }}'
36+
add-paths: |
37+
package.json
38+
src/config.json
39+
src-node/package.json
40+
src/index.html
41+
body: |
42+
Bump patch version to ${{ env.PHOENIX_VERSION }}
43+
- Auto-generated by `minor-version-bump.yml` action
44+
- name: Check outputs
45+
if: ${{ steps.cpr.outputs.pull-request-number }}
46+
run: |
47+
echo "Pull Request Number - ${{ steps.cpr.outputs.pull-request-number }}"
48+
echo "Pull Request URL - ${{ steps.cpr.outputs.pull-request-url }}"

0 commit comments

Comments
 (0)