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