Publish to VS Code MarketPlace & update Sentry #3
This file contains 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
name: Publish to VS Code MarketPlace | |
on: | |
workflow_dispatch: | |
jobs: | |
deploy: | |
runs-on: ubuntu-latest | |
if: github.ref == 'refs/heads/main' | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Get latest tag | |
run: | | |
latest-tag=$(git describe --tags --abbrev=0) | |
echo "Latest tag: $latest-tag" | |
echo "LATEST_TAG=$latest-tag" >> $GITHUB_ENV | |
- name: Set up Node.js | |
uses: actions/setup-node@v4 | |
with: | |
node-version: "22" | |
- name: Install dependencies | |
run: | | |
npm ci | |
npm install -g vsce | |
- name: Update version in package.json | |
run: | | |
jq --arg version "$LATEST_TAG" '.version = $version' package.json > package.tmp.json | |
mv package.tmp.json package.json | |
shell: bash | |
- name: Verify updated package.json | |
run: cat package.json | |
- name: Package VS Code Extension | |
run: vsce package | |
- name: Upload VSIX artifact | |
uses: actions/upload-artifact@v3 | |
with: | |
name: vsce-package | |
path: "*.vsix" | |
# - name: Publish to VS Code Marketplace | |
# env: | |
# VSCE_PAT: ${{ secrets.VSCE_PAT }} | |
# run: vsce publish -p $VSCE_PAT |