Create bump version PR #1
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |