File tree Expand file tree Collapse file tree 2 files changed +48
-1
lines changed Expand file tree Collapse file tree 2 files changed +48
-1
lines changed Original file line number Diff line number Diff line change
1
+ name : Release
2
+
3
+ on :
4
+ pull_request :
5
+ types : [closed]
6
+ branches : [main]
7
+
8
+ jobs :
9
+ release :
10
+ if : github.event.pull_request.merged == true && startsWith(github.event.pull_request.head.ref, 'version-bump-')
11
+ runs-on : ubuntu-latest
12
+ permissions :
13
+ contents : write
14
+ id-token : write
15
+
16
+ steps :
17
+ - name : Checkout code
18
+ uses : actions/checkout@v4
19
+ with :
20
+ fetch-depth : 0
21
+
22
+ - name : Setup Node.js
23
+ uses : actions/setup-node@v4
24
+ with :
25
+ node-version : ' 18'
26
+ registry-url : ' https://registry.npmjs.org'
27
+
28
+ - name : Extract version from package.json
29
+ id : version
30
+ run : echo "version=$(node -p "require('./UnityNaturalMCPServer/package.json').version")" >> $GITHUB_OUTPUT
31
+
32
+ - name : Create and push git tag
33
+ run : |
34
+ git config --local user.email "[email protected] "
35
+ git config --local user.name "GitHub Action"
36
+ git tag "v${{ steps.version.outputs.version }}"
37
+ git push origin "v${{ steps.version.outputs.version }}"
38
+
39
+ - name : Create GitHub Release
40
+ uses : softprops/action-gh-release@v2
41
+ with :
42
+ tag_name : " v${{ steps.version.outputs.version }}"
43
+ name : " Release v${{ steps.version.outputs.version }}"
44
+ draft : false
45
+ prerelease : false
46
+ env :
47
+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
Original file line number Diff line number Diff line change 37
37
38
38
- name : Commit changes
39
39
run : |
40
- git add UnityNaturalMCPServer/package.json UnityNaturalMCPServer/package-lock.json
40
+ git add UnityNaturalMCPServer/package.json
41
41
git commit -m "chore: bump version to ${{ github.event.inputs.version }}"
42
42
43
43
- name : Push branch
You can’t perform that action at this time.
0 commit comments