forked from evanp/inference-coop-copilot
chore: push to VS Marketplace on semver tag
This commit is contained in:
3 files changed
+60
No files matched your search
@@ -0,0 +1,42 @@
|
||||
name: Publish to VS Marketplace
|
||||
|
||||
on:
|
||||
push:
|
||||
tags:
|
||||
- 'v[0-9]+.[0-9]+.[0-9]+'
|
||||
|
||||
jobs:
|
||||
publish:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Check out
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Set up Node
|
||||
uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: '24'
|
||||
|
||||
- name: Verify tag matches package.json version
|
||||
env:
|
||||
TAG_REF: ${{ gitea.ref_name }}
|
||||
run: |
|
||||
tag="${TAG_REF#v}"
|
||||
pkg="$(node -p "require('./package.json').version")"
|
||||
echo "Tag version: $tag"
|
||||
echo "package.json version: $pkg"
|
||||
if [ "$tag" != "$pkg" ]; then
|
||||
echo "::error::Tag v$tag does not match package.json version $pkg"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
- name: Install dependencies
|
||||
run: npm ci
|
||||
|
||||
- name: Type-check, lint, and bundle
|
||||
run: npm run package
|
||||
|
||||
- name: Publish to VS Marketplace
|
||||
env:
|
||||
VSCE_PAT: ${{ secrets.VSCE_PAT }}
|
||||
run: npx vsce publish -p "$VSCE_PAT" --skip-duplicate
|
||||
Reference in new issue
Block a user