-
Notifications
You must be signed in to change notification settings - Fork 238
ci: create release of vscode extension #4765
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
4ccf83d
to
3517c57
Compare
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v4 | ||
- name: Setup Node.js | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version: '20' | ||
- name: Install pnpm | ||
uses: pnpm/action-setup@v2 | ||
with: | ||
version: 10 | ||
- name: Install dependencies | ||
run: pnpm install --frozen-lockfile | ||
- name: Extract version from tag | ||
id: extract_version | ||
run: | | ||
VERSION=${GITHUB_REF#refs/tags/vscode@v} | ||
echo "VERSION=$VERSION" >> $GITHUB_OUTPUT | ||
- name: Update package.json version | ||
working-directory: vscode/extension | ||
run: | | ||
npm version ${{ steps.extract_version.outputs.VERSION }} --no-git-tag-version | ||
- name: Install dependencies | ||
working-directory: vscode/extension | ||
run: pnpm install | ||
- name: Run CI | ||
run: pnpm run ci | ||
- name: Build extension | ||
working-directory: vscode/extension | ||
run: pnpm run vscode:package | ||
- name: Package extension | ||
working-directory: vscode/extension | ||
run: | | ||
pnpm run vscode:package | ||
- name: Upload extension to Marketplace | ||
working-directory: vscode/extension | ||
run: | | ||
pnpx vsce publish --packagePath sqlmesh-${{ steps.extract_version.outputs.VERSION }}.vsix | ||
env: | ||
VSCE_PAT: ${{ secrets.VSCE_PAT }} |
Check warning
Code scanning / CodeQL
Workflow does not contain permissions Medium
This autofix suggestion was applied.
Show autofix suggestion
Hide autofix suggestion
Copilot Autofix
AI 25 days ago
To fix the issue, add a permissions
block to the workflow. This block should specify the minimal permissions required for the workflow to function correctly. Based on the operations performed in the workflow, the following permissions are recommended:
contents: read
for accessing repository contents.packages: write
for publishing the extension to the Marketplace.
The permissions
block should be added at the root level of the workflow to apply to all jobs, as no job-specific permissions are defined.
-
Copy modified lines R6-R8
@@ -5,2 +5,5 @@ | ||
- 'vscode@v*' | ||
permissions: | ||
contents: read | ||
packages: write | ||
jobs: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR introduces a new GitHub Actions workflow to automate the release process for the VSCode extension.
- Adds a workflow triggered by push tags matching the pattern "vscode@v*".
- Implements steps for checking out code, setting up Node.js, installing dependencies, extracting version, updating package.json, building, packaging, and uploading the extension.
5e26dbd
to
33aff98
Compare
33aff98
to
5c97517
Compare
No description provided.