2026-08-19 - Invariant 1.3.0 #6
Workflow file for this run
This file contains hidden or 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 release | |
| on: | |
| release: | |
| types: [published] | |
| permissions: | |
| contents: read | |
| concurrency: | |
| group: publish-${{ github.event.release.tag_name }} | |
| cancel-in-progress: false | |
| jobs: | |
| vscode: | |
| name: Visual Studio Marketplace | |
| if: ${{ startsWith(github.event.release.tag_name, 'invariant-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/*' | |
| - run: echo "PLUGIN_VERSION=${GITHUB_REF_NAME#invariant-v}" >> "$GITHUB_ENV" | |
| - name: Check release version | |
| run: test "$(node -p "require('./vscode/package.json').version")" = "$PLUGIN_VERSION" | |
| - run: npm test --prefix vscode | |
| - run: npm run package --prefix vscode | |
| - name: Attach VS Code extension | |
| run: gh release upload "$GITHUB_REF_NAME" "vscode/invariant-colors-$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/invariant-colors-$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/invariant-colors-$PLUGIN_VERSION.vsix" | |
| env: | |
| OVSX_PAT: ${{ secrets.OVSX_PAT }} | |
| jetbrains: | |
| name: JetBrains Marketplace | |
| if: ${{ startsWith(github.event.release.tag_name, 'invariant-v') }} | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: write | |
| env: | |
| PUBLISH_TOKEN: ${{ secrets.INTELLIJ_PUBLISH_TOKEN }} | |
| steps: | |
| - uses: actions/checkout@v7 | |
| with: | |
| ref: ${{ github.event.release.tag_name }} | |
| - uses: actions/setup-java@v5 | |
| with: | |
| distribution: temurin | |
| java-version: 25 | |
| - run: echo "PLUGIN_VERSION=${GITHUB_REF_NAME#invariant-v}" >> "$GITHUB_ENV" | |
| # Restores the Gradle cache JetBrains CI writes on master, so the IntelliJ | |
| # Platform is not downloaded again here. Left read-only on purpose: this job | |
| # runs on a tag, and a cache written under one tag is unreadable from every | |
| # other tag. | |
| - uses: gradle/actions/setup-gradle@v6 | |
| with: | |
| gradle-version: 9.7.0 | |
| - run: gradle buildPlugin verifyPlugin | |
| working-directory: jetbrains | |
| - name: Attach JetBrains plugin | |
| run: gh release upload "$GITHUB_REF_NAME" "jetbrains/build/distributions/invariant-$PLUGIN_VERSION.zip" --clobber | |
| env: | |
| GH_TOKEN: ${{ github.token }} | |
| - if: ${{ !github.event.release.prerelease }} | |
| run: gradle -p jetbrains publishPlugin |