Skip to content

[dependencies]: Bump @modelcontextprotocol/inspector from 0.16.1 to 0.16.6 #36

[dependencies]: Bump @modelcontextprotocol/inspector from 0.16.1 to 0.16.6

[dependencies]: Bump @modelcontextprotocol/inspector from 0.16.1 to 0.16.6 #36

name: Update Package Version
permissions:
contents: read
pull-requests: write
packages: write
on:
pull_request:
types:
- opened
- edited
- labeled
- unlabeled
jobs:
update-version:
name: Update Package Version
runs-on: windows-latest
if: contains(github.event.pull_request.labels.*.name, 'minor') || contains(github.event.pull_request.labels.*.name, 'patch')
steps:
- uses: step-security/harden-runner@6c439dc8bdf85cadbbce9ed30d1c7b959517bc49 # v2.12.2
with:
egress-policy: audit
- name: Determine version type
id: version_type
run: |
if ($env:GITHUB_EVENT_PULL_REQUEST_LABELS -contains "minor") {
$env:VERSION_TYPE = "minor"
} elseif ($env:GITHUB_EVENT_PULL_REQUEST_LABELS -contains "patch") {
$env:VERSION_TYPE = "patch"
} else {
$env:VERSION_TYPE = ""
}
shell: pwsh
- name: Checkout code
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- name: Set up Node.js
uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0
with:
node-version: 20
- name: Update package version and push tag
if: env.VERSION_TYPE != ''
run: |
$newVersion = npm version $env:VERSION_TYPE
git tag "v$newVersion"
git push origin "v$newVersion"
shell: pwsh
- name: Push changes
if: env.VERSION_TYPE != ''
run: |
git config user.name "github-actions[bot]"
git config user.email "github-actions[bot]@users.noreply.github.com"
git push origin HEAD:main
shell: pwsh