-
Notifications
You must be signed in to change notification settings - Fork 640
70 lines (63 loc) · 1.86 KB
/
create-bumb-version-pr.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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
name: Create bump version PR
on:
workflow_dispatch:
# inputs:
# branche:
# description: Change version of the branch.
# default: 'master'
# type: choice
# options:
# - master
# - beta
# - alpha
# - next
# version:
# description: Version release as.
# default: 'auto'
# type: choice
# options:
# - auto
# - patch
# - minor
# - major
concurrency:
group: '${{ github.workflow }} - ${{ github.ref }}'
cancel-in-progress: true
jobs:
bump-version-pr:
name: Bump version PR
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [18.x]
steps:
- uses: actions/checkout@v4
# with:
# ref: ${{ inputs.branche }}
- name: Install dependencies
uses: ./.github/actions/prepare-install
with:
node-version: ${{ matrix.node-version }}
- name: Pre build ckeck
run: pnpm build
- name: Create Version Pull Request
id: changesets
uses: changesets/action@v1
with:
version: pnpm publish-version
commit: 'chore: version'
title: 'chore: version'
setupGitUser: true
createGithubReleases: false
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: After changesets
run: |
if [[ ${{ steps.changesets.outputs.hasChangesets }} == false ]]; then
# No changesets
echo "::error title=No changesets found::All changesets are empty, not creating PR, please add changeset"
exit 1
else
# Created Pull Request
echo "::notice title=PR is created::Created bump version PR address is: https://github.com/${{github.repository}}/pull/${{steps.changesets.outputs.pullRequestNumber}}"
fi