fix: unicode string path error in. python template #60
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: Build and Release VSCode Extension | |
| on: | |
| push: | |
| branches: | |
| - main | |
| tags: | |
| - 'v*' | |
| pull_request: | |
| branches: | |
| - main | |
| workflow_dispatch: | |
| permissions: | |
| contents: write | |
| jobs: | |
| test: | |
| strategy: | |
| matrix: | |
| os: [macos-latest, ubuntu-latest, windows-latest] | |
| runs-on: ${{ matrix.os }} | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Install Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: 20.12.1 | |
| cache: 'npm' | |
| - name: Install dependencies | |
| run: npm install | |
| - name: Run tests on Linux (with xvfb) | |
| run: xvfb-run -a npm test | |
| if: runner.os == 'Linux' | |
| - name: Run tests on macOS/Windows | |
| run: npm test | |
| if: runner.os != 'Linux' | |
| build-and-release: | |
| # 태그가 푸시된 경우에만 릴리스 실행 | |
| if: startsWith(github.ref, 'refs/tags/v') | |
| needs: test | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: 20.12.1 | |
| cache: 'npm' | |
| - name: Install dependencies | |
| run: npm install | |
| - name: Install vsce (Visual Studio Code Extension Manager) | |
| run: npm install -g @vscode/vsce | |
| - name: Package extension | |
| run: vsce package | |
| - name: Get extension info | |
| id: extension_info | |
| run: | | |
| VSIX_FILE=$(ls *.vsix | head -1) | |
| echo "vsix_file=$VSIX_FILE" >> $GITHUB_OUTPUT | |
| echo "extension_name=${VSIX_FILE}" >> $GITHUB_OUTPUT | |
| VERSION=${GITHUB_REF#refs/tags/} | |
| echo "version=$VERSION" >> $GITHUB_OUTPUT | |
| - name: Create Release | |
| id: create_release | |
| uses: actions/create-release@v1 | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| with: | |
| tag_name: ${{ github.ref_name }} | |
| release_name: Release ${{ steps.extension_info.outputs.version }} | |
| body: | | |
| ### Installation Instructions | |
| 1. Download the `.vsix` file from the assets below | |
| 2. Open VSCode | |
| 3. Press `Ctrl+Shift+P` (or `Cmd+Shift+P` on Mac) | |
| 4. Type "Extensions: Install from VSIX..." | |
| 5. Select the downloaded `.vsix` file | |
| ### Alternative Installation via Command Line | |
| ```bash | |
| code --install-extension ${{ steps.extension_info.outputs.extension_name }} | |
| ``` | |
| ### Files | |
| - `${{ steps.extension_info.outputs.extension_name }}` - VSCode Extension Package | |
| --- | |
| *This release was automatically built* | |
| draft: false | |
| prerelease: false | |
| - name: Upload Release Asset | |
| uses: actions/upload-release-asset@v1 | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| with: | |
| upload_url: ${{ steps.create_release.outputs.upload_url }} | |
| asset_path: ./${{ steps.extension_info.outputs.vsix_file }} | |
| asset_name: ${{ steps.extension_info.outputs.vsix_file }} | |
| asset_content_type: application/octet-stream | |
| - name: Upload build artifacts | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: vscode-extension-${{ steps.extension_info.outputs.version }} | |
| path: '*.vsix' | |
| retention-days: 30 |