77 workflow_dispatch :
88 inputs :
99 version :
10- description : ' Version to release (e.g., 1.9.1)'
10+ description : ' Test version (e.g., 1.9.1-test )'
1111 required : true
1212 type : string
1313
@@ -46,70 +46,44 @@ jobs:
4646 - name : Build TypeScript
4747 run : npm run build
4848
49- - name : Update version (if manual trigger)
50- if : github.event_name == 'workflow_dispatch'
51- run : |
52- npm version ${{ github.event.inputs.version }} --no-git-tag-version
53- git config user.name "github-actions[bot]"
54- git config user.email "github-actions[bot]@users.noreply.github.com"
55- git add package.json
56- git commit -m "chore: bump version to ${{ github.event.inputs.version }}"
57- git tag v${{ github.event.inputs.version }}
58- git push origin main --tags
59-
60- - name : Get version from tag
49+ - name : Get version from tag or input
6150 id : get_version
6251 run : |
6352 if [ "${{ github.event_name }}" = "workflow_dispatch" ]; then
64- echo "VERSION=${{ github.event.inputs.version }}" >> $GITHUB_OUTPUT
53+ VERSION="${{ github.event.inputs.version }}"
54+ echo "VERSION=$VERSION" >> $GITHUB_OUTPUT
55+ echo "IS_TEST=true" >> $GITHUB_OUTPUT
56+ echo "📝 Test version: $VERSION"
6557 else
6658 VERSION=${GITHUB_REF#refs/tags/v}
6759 echo "VERSION=$VERSION" >> $GITHUB_OUTPUT
60+ echo "IS_TEST=false" >> $GITHUB_OUTPUT
61+ echo "🚀 Release version: $VERSION"
62+ # Update package.json version for production releases
63+ npm version $VERSION --no-git-tag-version
6864 fi
6965
70- - name : Create package tarball
66+ - name : Create package
7167 run : npm pack
7268
73- - name : Create GitHub Release
74- uses : softprops/action-gh-release@v1
75- with :
76- tag_name : v${{ steps.get_version.outputs.VERSION }}
77- name : Release v${{ steps.get_version.outputs.VERSION }}
78- body : |
79- ## Release v${{ steps.get_version.outputs.VERSION }}
80-
81- ### Features
82- - Bundled AXe binary and frameworks for zero-setup UI automation
83- - No manual installation required - works out of the box
84-
85- ### Installation
86- ```bash
87- npm install -g xcodebuildmcp@${{ steps.get_version.outputs.VERSION }}
88- ```
89-
90- Or use with npx:
91- ```bash
92- npx xcodebuildmcp@${{ steps.get_version.outputs.VERSION }}
93- ```
94-
95- ### What's Included
96- - Latest AXe binary built from [cameroncooke/axe](https://github.com/cameroncooke/axe)
97- - All required frameworks (FBControlCore, FBDeviceControl, FBSimulatorControl, XCTestBootstrap)
98- - Full XcodeBuildMCP functionality with UI automation support
99- files : |
100- xcodebuildmcp-${{ steps.get_version.outputs.VERSION }}.tgz
101- draft : false
102- prerelease : false
69+ - name : Test publish (dry run for manual triggers)
70+ if : github.event_name == 'workflow_dispatch'
71+ run : |
72+ echo "🧪 Testing package creation (dry run)"
73+ npm publish --dry-run --access public
10374
104- - name : Publish to NPM
75+ - name : Publish to NPM (production releases only)
76+ if : github.event_name == 'push'
10577 run : npm publish --access public
10678 env :
10779 NODE_AUTH_TOKEN : ${{ secrets.NPM_TOKEN }}
10880
109- - name : Update release with NPM link
81+ - name : Create GitHub Release (production releases only)
82+ if : github.event_name == 'push'
11083 uses : softprops/action-gh-release@v1
11184 with :
11285 tag_name : v${{ steps.get_version.outputs.VERSION }}
86+ name : Release v${{ steps.get_version.outputs.VERSION }}
11387 body : |
11488 ## Release v${{ steps.get_version.outputs.VERSION }}
11589
@@ -130,7 +104,21 @@ jobs:
130104 📦 **NPM Package**: https://www.npmjs.com/package/xcodebuildmcp/v/${{ steps.get_version.outputs.VERSION }}
131105
132106 ### What's Included
133- - Latest AXe binary built from [cameroncooke/axe](https://github.com/cameroncooke/axe)
107+ - Latest AXe binary from [cameroncooke/axe](https://github.com/cameroncooke/axe)
134108 - All required frameworks (FBControlCore, FBDeviceControl, FBSimulatorControl, XCTestBootstrap)
135109 - Full XcodeBuildMCP functionality with UI automation support
136- append_body : false
110+ files : |
111+ xcodebuildmcp-${{ steps.get_version.outputs.VERSION }}.tgz
112+ draft : false
113+ prerelease : false
114+
115+ - name : Summary
116+ run : |
117+ if [ "${{ steps.get_version.outputs.IS_TEST }}" = "true" ]; then
118+ echo "🧪 Test completed for version: ${{ steps.get_version.outputs.VERSION }}"
119+ echo "Ready for production release!"
120+ else
121+ echo "🎉 Production release completed!"
122+ echo "Version: ${{ steps.get_version.outputs.VERSION }}"
123+ echo "📦 NPM: https://www.npmjs.com/package/xcodebuildmcp/v/${{ steps.get_version.outputs.VERSION }}"
124+ fi
0 commit comments