feat: mcp #40
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Release | |
| on: | |
| push: | |
| branches: [main] | |
| permissions: | |
| contents: write | |
| issues: write | |
| pull-requests: write | |
| jobs: | |
| build-and-release: | |
| runs-on: macos-latest | |
| env: | |
| HAS_SIGNING_CERT: ${{ secrets.APPLE_CERT_P12_BASE64 != '' }} | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| persist-credentials: false | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: 20 | |
| cache: npm | |
| - name: Install dependencies | |
| run: npm ci | |
| - name: Run tests | |
| run: npm test | |
| - name: Build Electron app | |
| run: npm run build | |
| - name: Import Code Signing Certificates | |
| if: env.HAS_SIGNING_CERT == 'true' | |
| uses: apple-actions/import-codesign-certs@v3 | |
| with: | |
| p12-file-base64: ${{ secrets.APPLE_CERT_P12_BASE64 }} | |
| p12-password: ${{ secrets.APPLE_CERT_P12_PASSWORD }} | |
| - name: Package Electron app (dry run) | |
| run: npx electron-builder --config electron-builder.yml --publish never | |
| env: | |
| CSC_IDENTITY_AUTO_DISCOVERY: ${{ env.HAS_SIGNING_CERT }} | |
| APPLE_TEAM_ID: ${{ secrets.APPLE_TEAM_ID }} | |
| APPLE_ID: ${{ secrets.APPLE_ID }} | |
| APPLE_APP_SPECIFIC_PASSWORD: ${{ secrets.APPLE_APP_SPECIFIC_PASSWORD }} | |
| - name: Semantic Release | |
| id: semantic | |
| uses: cycjimmy/semantic-release-action@v4 | |
| with: | |
| semantic_version: 24 | |
| extra_plugins: | | |
| @semantic-release/changelog@6 | |
| @semantic-release/git@10 | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Pull latest changes | |
| if: steps.semantic.outputs.new_release_published == 'true' | |
| run: | | |
| git config --global user.email "github-actions[bot]@users.noreply.github.com" | |
| git config --global user.name "github-actions[bot]" | |
| git pull origin main | |
| - name: Rebuild with new version | |
| if: steps.semantic.outputs.new_release_published == 'true' | |
| run: npm run build | |
| - name: Package and Publish | |
| if: steps.semantic.outputs.new_release_published == 'true' | |
| run: npx electron-builder --config electron-builder.yml --publish always | |
| env: | |
| GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| CSC_IDENTITY_AUTO_DISCOVERY: ${{ env.HAS_SIGNING_CERT }} | |
| APPLE_ID: ${{ secrets.APPLE_ID }} | |
| APPLE_APP_SPECIFIC_PASSWORD: ${{ secrets.APPLE_APP_SPECIFIC_PASSWORD }} | |
| APPLE_TEAM_ID: ${{ secrets.APPLE_TEAM_ID }} |