Skip to content

2026-08-23 - Invariant 1.3.1 #4

2026-08-23 - Invariant 1.3.1

2026-08-23 - Invariant 1.3.1 #4

name: Publish Invariant Highlighter
on:
release:
types: [published]
permissions:
contents: read
concurrency:
group: publish-highlighter-${{ github.event.release.tag_name }}
cancel-in-progress: false
jobs:
highlighter:
name: Invariant Highlighter
if: ${{ startsWith(github.event.release.tag_name, 'highlighter-v') }}
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- uses: actions/checkout@v7
with:
ref: ${{ github.event.release.tag_name }}
- uses: actions/setup-node@v7
with:
node-version: 'lts/*'
cache: npm
cache-dependency-path: vscode-highlighter/package-lock.json
- run: echo "PLUGIN_VERSION=${GITHUB_REF_NAME#highlighter-v}" >> "$GITHUB_ENV"
- run: test "$(node -p "require('./vscode-highlighter/package.json').version")" = "$PLUGIN_VERSION"
- run: npm ci --prefix vscode-highlighter
- run: npm test --prefix vscode-highlighter
- run: npm run package --prefix vscode-highlighter
- name: Attach VSIX
run: gh release upload "$GITHUB_REF_NAME" "vscode-highlighter/invariant-colors-highlighter-$PLUGIN_VERSION.vsix" --clobber
env:
GH_TOKEN: ${{ github.token }}
- name: Publish to Visual Studio Marketplace
if: ${{ !github.event.release.prerelease }}
run: npx --yes @vscode/vsce@3.9.2 publish --packagePath "vscode-highlighter/invariant-colors-highlighter-$PLUGIN_VERSION.vsix"
env:
VSCE_PAT: ${{ secrets.VSCE_PAT }}
- name: Publish to Open VSX
if: ${{ !github.event.release.prerelease }}
run: npx --yes ovsx@1.1.1 publish "vscode-highlighter/invariant-colors-highlighter-$PLUGIN_VERSION.vsix"
env:
OVSX_PAT: ${{ secrets.OVSX_PAT }}