Skip to content

fix: Update CI/CD workflow for improved artifact handling#8

Merged
MatFillion merged 1 commit intomainfrom
fix-deploy-step
Sep 23, 2025
Merged

fix: Update CI/CD workflow for improved artifact handling#8
MatFillion merged 1 commit intomainfrom
fix-deploy-step

Conversation

@MatFillion
Copy link
Member

No description provided.

Copilot AI review requested due to automatic review settings September 23, 2025 05:12
Copy link
Contributor

Copilot AI left a 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 improves the CI/CD workflow for VS Code extension publishing by implementing proper artifact handling between build and deploy jobs. The changes separate the build and deployment concerns, ensuring the VSIX package created during build is properly transferred to the deployment job.

Key changes:

  • Added artifact upload step in the build job to store the generated VSIX file
  • Modified the deploy job to download the artifact instead of attempting to upload it
  • Enhanced the deployment script with better error handling and updated to use the maintained @vscode/vsce package

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

# For example, using vsce to publish the extension
npx vsce publish --pat ${{ secrets.VSCE_PAT }} No newline at end of file
# Publish pre-built VSIX using the maintained @vscode/vsce package
FILE=$(ls -1 *.vsix | head -n 1)
Copy link

Copilot AI Sep 23, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This command will fail if no VSIX files are found, causing the deployment to fail silently. Add a check to ensure at least one VSIX file exists before attempting to list them, or use a more robust file selection method.

Suggested change
FILE=$(ls -1 *.vsix | head -n 1)
FILE=$(ls -1 *.vsix 2>/dev/null | head -n 1)
if [ -z "$FILE" ]; then
echo "Error: No VSIX files found to publish." >&2
exit 1
fi

Copilot uses AI. Check for mistakes.
Comment on lines +64 to +67
if [ -z "${VSCE_PAT}" ]; then
echo "VSCE_PAT secret is not set" >&2
exit 1
fi
Copy link

Copilot AI Sep 23, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[nitpick] The VSCE_PAT validation is redundant since the secret is already referenced in the env block at line 70. GitHub Actions will automatically handle missing secrets, and this check adds unnecessary complexity to the deployment script.

Suggested change
if [ -z "${VSCE_PAT}" ]; then
echo "VSCE_PAT secret is not set" >&2
exit 1
fi

Copilot uses AI. Check for mistakes.
@MatFillion MatFillion merged commit 31fa99b into main Sep 23, 2025
3 checks passed
@MatFillion MatFillion deleted the fix-deploy-step branch September 26, 2025 04:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants