v0.2.2 #7
Workflow file for this run
This file contains 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: Publish Release | |
on: | |
release: | |
types: [published] | |
env: | |
VSIX_NAME: vscode-pyright.vsix | |
NODE_VERSION: '16' # Shipped with VS Code. | |
jobs: | |
publish_pypi: | |
runs-on: ubuntu-latest | |
permissions: | |
id-token: write | |
contents: write | |
packages: write | |
pull-requests: read | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Get npm cache directory | |
id: npm-cache | |
run: | | |
echo "::set-output name=dir::$(npm config get cache)" | |
- run: ./pw pdm publish | |
publish_extension: | |
runs-on: ubuntu-latest | |
name: Publish extension to marketplace | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-node@v3 | |
with: | |
node-version: ${{ env.NODE_VERSION }} | |
- run: npm install | |
- name: Download VSIX | |
uses: i3h/download-release-asset@v1 | |
with: | |
owner: detachhead | |
repo: basedpyright | |
tag: ${{ github.event.release.tag_name }} | |
file: ${{ env.VSIX_NAME }} | |
token: ${{ secrets.GITHUB_TOKEN }} | |
# https://code.visualstudio.com/api/working-with-extensions/publishing-extension | |
- name: Install VSCE | |
run: | | |
npm install -g "vsce@$(jq -r '.dependencies.vsce.version' < packages/vscode-pyright/package-lock.json)" | |
npx vsce --version | |
# https://code.visualstudio.com/api/working-with-extensions/publishing-extension#get-a-personal-access-token | |
- name: Publish VSIX | |
run: npx vsce publish --packagePath ${{ env.VSIX_NAME }} --pat ${{ secrets.VSCE_TOKEN }} --noVerify |