style(config): format release-please configuration files #10
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 Extension | |
| on: | |
| push: | |
| branches: | |
| - main | |
| workflow_dispatch: | |
| inputs: | |
| release-type: | |
| description: "Release type override (leave empty for automatic)" | |
| required: false | |
| default: "" | |
| type: string | |
| permissions: | |
| contents: write | |
| issues: write | |
| pull-requests: write | |
| jobs: | |
| release-please: | |
| runs-on: ubuntu-latest | |
| outputs: | |
| release_created: ${{ steps.release.outputs.release_created }} | |
| tag_name: ${{ steps.release.outputs.tag_name }} | |
| version: ${{ steps.release.outputs.version }} | |
| steps: | |
| - name: Run release-please | |
| id: release | |
| uses: googleapis/release-please-action@v4 | |
| with: | |
| token: ${{ secrets.GITHUB_TOKEN }} | |
| config-file: release-please-config.json | |
| manifest-file: .release-please-manifest.json | |
| publish: | |
| needs: release-please | |
| if: ${{ needs.release-please.outputs.release_created == 'true' }} | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: "22.x" | |
| cache: "npm" | |
| - name: Install dependencies | |
| run: npm ci | |
| - name: Run type check | |
| run: npm run type-check | |
| - name: Run linter | |
| run: npm run lint:check | |
| - name: Build extension | |
| run: npm run compile | |
| - name: Run tests | |
| run: npm run test | |
| continue-on-error: true # Don't fail release if tests fail | |
| - name: Install vsce | |
| run: npm install -g @vscode/vsce | |
| - name: Package extension | |
| run: vsce package -o diffy-explain-ai-${{ needs.release-please.outputs.version }}.vsix | |
| - name: Publish to VS Code Marketplace | |
| env: | |
| VSCE_PAT: ${{ secrets.VSCE_PAT }} | |
| run: vsce publish -p $VSCE_PAT --packagePath diffy-explain-ai-${{ needs.release-please.outputs.version }}.vsix | |
| - name: Create GitHub Release | |
| uses: softprops/action-gh-release@v2 | |
| with: | |
| tag_name: ${{ needs.release-please.outputs.tag_name }} | |
| name: Release ${{ needs.release-please.outputs.tag_name }} | |
| body: | | |
| ## What's Changed | |
| This release was automatically created by [release-please](https://github.com/googleapis/release-please). | |
| ### Installation | |
| **From VS Code Marketplace:** | |
| ``` | |
| code --install-extension hitclaw.diffy-explain-ai | |
| ``` | |
| **Or download the VSIX file** from the assets below and install manually. | |
| files: diffy-explain-ai-${{ needs.release-please.outputs.version }}.vsix | |
| draft: false | |
| prerelease: false | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Upload VSIX artifact | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: diffy-explain-ai-${{ needs.release-please.outputs.version }} | |
| path: diffy-explain-ai-${{ needs.release-please.outputs.version }}.vsix | |
| retention-days: 90 | |
| if-no-files-found: error | |
| - name: Release summary | |
| run: | | |
| echo "## 🎉 Release Complete!" >> $GITHUB_STEP_SUMMARY | |
| echo "" >> $GITHUB_STEP_SUMMARY | |
| echo "- **Version**: ${{ needs.release-please.outputs.tag_name }}" >> $GITHUB_STEP_SUMMARY | |
| echo "- **Extension Package**: diffy-explain-ai-${{ needs.release-please.outputs.version }}.vsix" >> $GITHUB_STEP_SUMMARY | |
| echo "- **Marketplace**: Published ✅" >> $GITHUB_STEP_SUMMARY | |
| echo "- **GitHub Release**: Created ✅" >> $GITHUB_STEP_SUMMARY | |
| echo "" >> $GITHUB_STEP_SUMMARY | |
| echo "### 📦 Install" >> $GITHUB_STEP_SUMMARY | |
| echo "\`\`\`bash" >> $GITHUB_STEP_SUMMARY | |
| echo "# From VS Code Marketplace" >> $GITHUB_STEP_SUMMARY | |
| echo "code --install-extension hitclaw.diffy-explain-ai" >> $GITHUB_STEP_SUMMARY | |
| echo "" >> $GITHUB_STEP_SUMMARY | |
| echo "# Or download VSIX from GitHub Release" >> $GITHUB_STEP_SUMMARY | |
| echo "code --install-extension diffy-explain-ai-${{ needs.release-please.outputs.version }}.vsix" >> $GITHUB_STEP_SUMMARY | |
| echo "\`\`\`" >> $GITHUB_STEP_SUMMARY |