-
Notifications
You must be signed in to change notification settings - Fork 19
48 lines (42 loc) · 1.39 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
name: Create bump version PR
on:
workflow_dispatch:
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
- 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