Skip to content

Add automated VSIX build and release workflow for version tags#18

Merged
rajbos merged 3 commits intomainfrom
copilot/fix-88c9a8c1-1223-48a9-a9c6-245462b1b3a2
Sep 28, 2025
Merged

Add automated VSIX build and release workflow for version tags#18
rajbos merged 3 commits intomainfrom
copilot/fix-88c9a8c1-1223-48a9-a9c6-245462b1b3a2

Conversation

Copy link
Contributor

Copilot AI commented Sep 28, 2025

This PR implements an automated GitHub Actions workflow that creates VSIX packages and GitHub releases when version tags are pushed to the repository.

Problem Solved

Previously, creating releases required manual steps:

  • Building the extension locally
  • Running tests manually
  • Creating VSIX packages with vsce package
  • Manually creating GitHub releases
  • Uploading artifacts by hand

This manual process was error-prone and lacked provenance guarantees for the generated binaries.

Solution

Added .github/workflows/release.yml that automatically:

  1. Validates versions - Ensures the git tag version matches package.json version to prevent mismatched releases
  2. Runs full build pipeline - Executes linting, type checking, compilation, and tests
  3. Creates VSIX package - Uses vsce package to generate the extension installer
  4. Generates GitHub release - Creates a release with auto-generated notes from CHANGELOG.md
  5. Attaches artifacts - Uploads the VSIX file as a downloadable release asset

Usage

To create a new release:

# Update version in package.json and CHANGELOG.md
git add package.json CHANGELOG.md
git commit -m "Bump version to 1.0.0"
git push origin main

# Create and push version tag
git tag v1.0.0
git push origin v1.0.0

The workflow will automatically handle the rest, creating a GitHub release at https://github.com/rajbos/github-copilot-token-usage/releases/tag/v1.0.0 with the VSIX file attached.

Safety Features

  • Version mismatch protection: Workflow fails if tag version doesn't match package.json
  • Build verification: All tests must pass before release creation
  • Modern tooling: Uses GitHub CLI for reliable release creation
  • Clear feedback: Provides detailed success/failure messages

Documentation Updates

  • Enhanced README.md with release instructions and workflow explanation
  • Updated CHANGELOG.md with proper versioning format for automated parsing
  • Added comprehensive usage examples

This solution provides trustworthy, automated releases with full build verification and proper provenance tracking, eliminating the manual release process.

Original prompt

This section details on the original issue you should resolve

<issue_title>[FEATURE] Automated VSIX build on new version tag</issue_title>
<issue_description>Is your feature request related to a problem? Please describe.
I want to create a new release, with generated release notes when a new version tag is pushed into the repo

Describe the solution you'd like
New workflow that:

  • checks if the version number in the package.config matches the new tag
  • builds and runs the tests
  • generates the vsix file
  • creates a new release, and adds the vsix file to it as an artefact

Describe alternatives you've considered
Currently doing all this manually, which sucks

Use case
Generated release with provenance from the repo, to create more trust in the binary itself (no tampering on my laptop for example).

Priority
How important is this feature to you?

  • Critical - I can't use the extension effectively without this
  • High - This would significantly improve my experience
  • Medium - This would be a nice addition
  • Low - This is just a suggestion
    </issue_description>

Comments on the Issue (you are @copilot in this section)

Fixes #17

💬 Share your feedback on Copilot coding agent for the chance to win a $200 gift card! Click here to start the survey.

Copilot AI and others added 2 commits September 28, 2025 11:59
Co-authored-by: rajbos <6085745+rajbos@users.noreply.github.com>
Co-authored-by: rajbos <6085745+rajbos@users.noreply.github.com>
Copilot AI changed the title [WIP] [FEATURE] Automated VSIX build on new version tag Add automated VSIX build and release workflow for version tags Sep 28, 2025
Copilot AI requested a review from rajbos September 28, 2025 12:06
Copy link
Owner

@rajbos rajbos left a comment

Choose a reason for hiding this comment

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

LGTM! Let's try it out with v0.0.2

@rajbos rajbos marked this pull request as ready for review September 28, 2025 12:22
@rajbos rajbos merged commit 17fc868 into main Sep 28, 2025
@rajbos rajbos deleted the copilot/fix-88c9a8c1-1223-48a9-a9c6-245462b1b3a2 branch September 28, 2025 12:22
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.

[FEATURE] Automated VSIX build on new version tag

2 participants

Comments