fix: restore missing __init__.py files in src and tests, bump to v0.2.2 #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: VS Code Extension | |
| on: | |
| push: | |
| branches: | |
| - main | |
| tags: | |
| - "v*" | |
| paths: | |
| - "extensions/vscode/**" | |
| - ".github/workflows/vscode-extension.yml" | |
| pull_request: | |
| paths: | |
| - "extensions/vscode/**" | |
| - ".github/workflows/vscode-extension.yml" | |
| workflow_dispatch: | |
| jobs: | |
| build: | |
| name: Build and Package | |
| runs-on: ubuntu-latest | |
| defaults: | |
| run: | |
| working-directory: extensions/vscode | |
| steps: | |
| - name: Checkout Code | |
| uses: actions/checkout@v4 | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: 20 | |
| cache: "npm" | |
| cache-dependency-path: extensions/vscode/package-lock.json | |
| - name: Install Dependencies | |
| run: npm ci | |
| - name: Compile | |
| run: npm run compile | |
| - name: Package Extension | |
| run: npx vsce package | |
| # vsce package will generate a .vsix file in the current directory (extensions/vscode) | |
| - name: Upload Artifact | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: typedown-vscode-extension | |
| path: extensions/vscode/*.vsix | |
| if-no-files-found: error | |
| - name: Publish to Marketplace | |
| if: startsWith(github.ref, 'refs/tags/v') && env.VSCE_PAT != '' | |
| env: | |
| VSCE_PAT: ${{ secrets.VSCE_PAT }} | |
| run: npx vsce publish |