Skip to content

chore: bump version to 0.5.0 #2

chore: bump version to 0.5.0

chore: bump version to 0.5.0 #2

Workflow file for this run

name: Release
on:
pull_request:
types: [closed]
branches: [main]
jobs:
release:
if: github.event.pull_request.merged == true && startsWith(github.event.pull_request.head.ref, 'version-bump-')
runs-on: ubuntu-latest
permissions:
contents: write
id-token: write
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '18'
registry-url: 'https://registry.npmjs.org'
- name: Extract version from package.json
id: version
run: echo "version=$(node -p "require('./UnityNaturalMCPServer/package.json').version")" >> $GITHUB_OUTPUT
- name: Create and push git tag
run: |
git config --local user.email "action@github.com"
git config --local user.name "GitHub Action"
git tag "v${{ steps.version.outputs.version }}"
git push origin "v${{ steps.version.outputs.version }}"
- name: Create GitHub Release
uses: softprops/action-gh-release@v2
with:
tag_name: "v${{ steps.version.outputs.version }}"
name: "Release v${{ steps.version.outputs.version }}"
draft: false
prerelease: false
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}