Create bump version PR #24
Workflow file for this run
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: | |
# 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 |