Bumps [actions/checkout](https://github.com/actions/checkout) from 4 to 5. - [Release notes](https://github.com/actions/checkout/releases) - [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md) - [Commits](https://github.com/actions/checkout/compare/v4...v5) --- updated-dependencies: - dependency-name: actions/checkout dependency-version: '5' dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <support@github.com>
50 lines
1.6 KiB
YAML
50 lines
1.6 KiB
YAML
name: 'update package version'
|
|
on:
|
|
pull_request:
|
|
types:
|
|
- labeled
|
|
|
|
jobs:
|
|
minor:
|
|
runs-on: ubuntu-latest
|
|
if: ${{ github.event.label.name == 'release minor' }}
|
|
steps:
|
|
- name: check out repository code
|
|
uses: actions/checkout@v5
|
|
with:
|
|
ref: ${{ github.event.pull_request.head.ref }}
|
|
- name: git config
|
|
run: |
|
|
git config --global user.name "${GITHUB_ACTOR}"
|
|
git config --global user.email "${GITHUB_ACTOR}@users.noreply.github.com"
|
|
- name: increment minor version
|
|
run: |
|
|
npm version minor
|
|
- name: git push
|
|
run: |
|
|
git remote set-url origin https://github-actions:${GITHUB_TOKEN}@github.com/${GITHUB_REPOSITORY}
|
|
git push origin HEAD:${{ github.head_ref }}
|
|
env:
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
patch:
|
|
runs-on: ubuntu-latest
|
|
if: ${{ github.event.label.name == 'release patch' }}
|
|
steps:
|
|
- name: check out repository code
|
|
uses: actions/checkout@v5
|
|
with:
|
|
ref: ${{ github.event.pull_request.head.ref }}
|
|
- name: git config
|
|
run: |
|
|
git config --global user.name "${GITHUB_ACTOR}"
|
|
git config --global user.email "${GITHUB_ACTOR}@users.noreply.github.com"
|
|
- name: increment patch version
|
|
run: |
|
|
npm version patch
|
|
- name: git push
|
|
run: |
|
|
git remote set-url origin https://github-actions:${GITHUB_TOKEN}@github.com/${GITHUB_REPOSITORY}
|
|
git push origin HEAD:${{ github.head_ref }}
|
|
env:
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|