Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 15 additions & 6 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -222,21 +227,25 @@ 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

# 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:
Expand All @@ -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:
Expand Down
4 changes: 3 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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.<language>.disabledDiagnostics` settings stay.
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
2 changes: 1 addition & 1 deletion server/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion server/Cargo.toml
Original file line number Diff line number Diff line change
@@ -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"
Expand Down
Loading