Githubaction#12
Merged
Merged
Conversation
Owner
kasuken
commented
Sep 8, 2025
- Enhanced the GitHub Actions workflow to check out the base branch of the pull request for accurate builds.
- Added steps to read package metadata and ensure the VSCE token is provided before publishing.
- Updated the version in package.json from 0.7.1 to 0.7.2 to reflect the new changes.
…extension - Enhanced the GitHub Actions workflow to check out the base branch of the pull request for accurate builds. - Added steps to read package metadata and ensure the VSCE token is provided before publishing. - Updated the version in package.json from 0.7.1 to 0.7.2 to reflect the new changes.
There was a problem hiding this comment.
Pull Request Overview
This PR enhances the GitHub Actions workflow for publishing VS Code extensions by improving build accuracy and adding metadata handling. The changes ensure the workflow checks out the correct base branch for builds and includes proper token validation before publishing.
- Updated package version from 0.7.1 to 0.7.2
- Enhanced GitHub Actions workflow with base branch checkout and metadata extraction
- Added VSCE token validation and GitHub release creation steps
Reviewed Changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| package.json | Version bump from 0.7.1 to 0.7.2 |
| .github/workflows/publish-extension.yml | Enhanced workflow with base branch checkout, metadata reading, token validation, and GitHub release creation |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
| run: | | ||
| echo "version=$(node -p \"require('./package.json').version\")" >> $GITHUB_OUTPUT | ||
| echo "name=$(node -p \"require('./package.json').name\")" >> $GITHUB_OUTPUT | ||
| echo "vsix=$(node -p \"const p=require('./package.json'); console.log(`${p.name}-${p.version}.vsix`)\")" >> $GITHUB_OUTPUT |
There was a problem hiding this comment.
The node command uses both -p (print) and console.log() which will output both the return value and the logged value. Use either node -p without console.log or node -e with console.log, but not both.
Suggested change
| echo "vsix=$(node -p \"const p=require('./package.json'); console.log(`${p.name}-${p.version}.vsix`)\")" >> $GITHUB_OUTPUT | |
| echo "vsix=$(node -p \"const p=require('./package.json'); `${p.name}-${p.version}.vsix`\")" >> $GITHUB_OUTPUT |
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.