New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

semantic-release-vsce

Package Overview
Dependencies
Maintainers
2
Versions
87
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

semantic-release-vsce

semantic-release plugin to package and publish VS Code extensions

  • 5.2.1
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
718
decreased by-51.81%
Maintainers
2
Weekly downloads
 
Created
Source

semantic-release-vsce

semantic-release plugin to package and publish VS Code extensions.

npm downloads ci dependencies peerDependencies semantic-release

StepDescription
verifyVerify the presence and the validity of the authentication (set via environment variables) and the package.json
prepareGenerate the .vsix file using vsce, this can be be controlled by providing packageVsix in config.
Note: If the OVSX_PAT environment variable is set, this step will still run
publishPublish the extension

Install

npm install --save-dev semantic-release-vsce

or

yarn add --dev semantic-release-vsce

Usage

The plugin can be configured in the semantic-release configuration file:

{
  "plugins": [
    "@semantic-release/commit-analyzer",
    "@semantic-release/release-notes-generator",
    [
      "semantic-release-vsce",
      {
        "packageVsix": true
      }
    ],
    [
      "@semantic-release/github",
      {
        "assets": [
          {
            "path": "*.vsix",
            "label": "Extension File"
          }
        ]
      }
    ]
  ]
}

Configuration

OptionTypeDescription
packageVsixboolean or stringIf set to true, the plugin will generate a .vsix file. If is a string, it will be used as value for --out of vsce package.
publishbooleanThe plugin will publish the package unless this option is set to false, in which case it will only package the extension vsix.

Environment Variables

VariableDescription
VSCE_PATRequired unless publish is set to false. The personal access token to publish the extension of VS Code Marketplace
OVSX_PATOptional. The personal access token to push to OpenVSX

Publishing to OpenVSX

Publishing extensions to OpenVSX using this plugin is easy:

  1. Get a valid personal access token with the correct privileges to the publisher namespace in OpenVSX. In order to get the personal access token, check this page.

  2. Configure the OVSX_PAT environment variable in your CI with the token that you created.

  3. The plugin will automatically detect the environment variable and it will publish to OpenVSX, no additional configuration is needed. Enjoy!

Github Actions Example

name: release

on:
  push:
    branches: [master]

jobs:
  release:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v3
      - uses: actions/setup-node@v3
        with:
          node-version: 16
      - name: Install Node Dependencies
        run: npm ci
      - name: Release
        run: npx semantic-release
        env:
          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
          VSCE_PAT: ${{ secrets.VSCE_PAT }}

Keywords

FAQs

Package last updated on 21 Oct 2022

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc