From 28eb3178039a88ada2d2a0a7dbe6bfbd438607ed Mon Sep 17 00:00:00 2001 From: Claude Date: Sat, 14 Nov 2026 20:36:10 +0000 Subject: [PATCH 1/2] ci: publish pre-release tags to GitHub and npm next only The Marketplace rejects pre-release versions such as 1.0.0-rc.1, so a tag with a suffix would fail its Marketplace and Open VSX jobs. Such a tag now makes a GitHub pre-release with the .vsix files and publishes the npm packages under the next tag, leaving latest on the last release. Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_012jSfzj1UNFUHV9YmmbjLg4 --- .github/workflows/build.yml | 21 +++++++++++++++------ 1 file changed, 15 insertions(+), 6 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 481f10f..2246216 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -180,7 +180,12 @@ jobs: with: { name: vsix, path: "*.vsix" } - if: startsWith(github.ref, 'refs/tags/v') uses: softprops/action-gh-release@8a0cd651e5b2365bd640854a3fa5dfc70e4875f3 # v3.0.4 - with: { files: "*.vsix" } + # A tag with a pre-release suffix (v1.0.0-rc.1) is a GitHub pre-release. + with: + { + files: "*.vsix", + prerelease: "${{ contains(github.ref_name, '-') }}", + } # The npm packages: one per platform with its binary, and the main package with the bin wrapper. npm: @@ -222,12 +227,15 @@ jobs: with: { name: npm, path: npm-dist } # Artifacts lose the executable bit. - run: chmod +x npm-dist/*/bin/ruby-templates* - # A version already out is skipped, so a failed run can be re-run. - - run: | + # A version already out is skipped, so a failed run can be re-run. A pre-release goes to the `next` tag, so + # `npm install` keeps getting the last release. + - env: + DIST_TAG: ${{ contains(github.ref_name, '-') && 'next' || 'latest' }} + run: | publish() { spec=$(node -p "const p = require('./$1/package.json'); p.name + '@' + p.version") # npm reads a bare "dir/name" as a GitHub repository; "./" makes it a folder. - npm view "$spec" version >/dev/null 2>&1 || npm publish --provenance --access public "./$1" + npm view "$spec" version >/dev/null 2>&1 || npm publish --provenance --access public --tag "$DIST_TAG" "./$1" } for dir in npm-dist/*/; do [ "$dir" = npm-dist/main/ ] || publish "${dir%/}"; done publish npm-dist/main @@ -235,8 +243,9 @@ jobs: # Each registry gets its own job, so one failing doesn't block the other. # A version already out is skipped, so a failed run can be re-run. # Marketplace trusted publishing: no token, the publisher trusts this repository and workflow file. + # The Marketplace rejects pre-release versions (1.0.0-rc.1), so those ship only on GitHub and npm. publish-marketplace: - if: startsWith(github.ref, 'refs/tags/v') + if: startsWith(github.ref, 'refs/tags/v') && !contains(github.ref_name, '-') needs: extension runs-on: ubuntu-26.04 permissions: @@ -251,7 +260,7 @@ jobs: # Open VSX trusted publishing: no token, the registry trusts this repository and workflow file. publish-open-vsx: - if: startsWith(github.ref, 'refs/tags/v') + if: startsWith(github.ref, 'refs/tags/v') && !contains(github.ref_name, '-') needs: extension runs-on: ubuntu-26.04 permissions: From 1925b9201dca1a3f1e3bb979eb271f3929ea0455 Mon Sep 17 00:00:00 2001 From: Claude Date: Sat, 14 Nov 2026 20:39:33 +0000 Subject: [PATCH 2/2] chore: release 1.0.0-rc.1 Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_012jSfzj1UNFUHV9YmmbjLg4 --- CHANGELOG.md | 4 +++- package.json | 2 +- server/Cargo.lock | 2 +- server/Cargo.toml | 2 +- 4 files changed, 6 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index c3863f3..54514d2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,8 @@ # Changelog -## Unreleased +## 1.0.0-rc.1 + +The release candidate for 1.0.0. From 1.0 the [stability page](https://x-ror.github.io/vscode-ruby-templates/reference/stability/) says what follows Semantic Versioning. When upgrading from 0.16, check the entries marked **Breaking**. This candidate is on GitHub (the `.vsix` files) and on npm under `next`, not on the Marketplace or Open VSX. - **Breaking:** a department's `enabled = true` in a `.ruby-templates.toml` (`[Layout]`, `[Style]`, `[Turbo]`, ...) only turns back on the rules that are on by default, cancelling an `enabled = false` from a file above. A rule that is off by default (`Layout/EmptyLines`, `Turbo/PreferTurboAttributes`, `Layout/LineLength`, ...) needs its own `[Layout.EmptyLines] enabled = true`, so rules added later can't start rewriting files. - **Breaking:** `disabled_diagnostics` and the `[jbuilder]` table are removed from `.ruby-templates.toml`; the file reports them as a problem that names the replacement, `[Html.ImgAlt] enabled = false` (or `exclude = [...]` for some files). The VS Code `rubyTemplates..disabledDiagnostics` settings stay. diff --git a/package.json b/package.json index 4c43286..9f9ef4a 100644 --- a/package.json +++ b/package.json @@ -2,7 +2,7 @@ "name": "ruby-templates", "displayName": "Ruby Templates: ERB, Haml, Slim", "description": "Rails view tooling for ERB, Haml and Slim: highlighting, errors as you type, safe formatting, and Rails-aware go to partial, completion and hover for components, routes, ivars and i18n.", - "version": "0.16.0", + "version": "1.0.0-rc.1", "publisher": "x-ror", "icon": "images/icon.png", "license": "MIT", diff --git a/server/Cargo.lock b/server/Cargo.lock index f4a2f2f..2201b3a 100644 --- a/server/Cargo.lock +++ b/server/Cargo.lock @@ -362,7 +362,7 @@ dependencies = [ [[package]] name = "ruby-templates-ls" -version = "0.16.0" +version = "1.0.0-rc.1" dependencies = [ "dashmap", "regex", diff --git a/server/Cargo.toml b/server/Cargo.toml index 77e1376..d71be89 100644 --- a/server/Cargo.toml +++ b/server/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "ruby-templates-ls" -version = "0.16.0" +version = "1.0.0-rc.1" edition = "2021" rust-version = "1.85" description = "Language server for ERB, Haml and Slim templates"