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
2 changes: 2 additions & 0 deletions .github/workflows/release-js.yml
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,7 @@ jobs:
dry_run: ${{ inputs.dry_run || github.event_name == 'pull_request' }}
working_directory: test/release/js
package_manager: pnpm
node_version_file: test/release/js/.tool-versions # exercises node-version-file sourcing
package_name: '@braintrust/bt-publishing-test' # exercises the npm-availability fail-fast check
channel: ${{ inputs.channel || 'latest' }}
allowed_channels: 'latest,rc,next,beta'
Expand Down Expand Up @@ -231,6 +232,7 @@ jobs:
checkout: 'false' # bt-publishing-test: skip internal checkout — version patching above must survive into the build
working_directory: test/release/js
package_manager: pnpm
node_version_file: test/release/js/.tool-versions
dry_run: ${{ inputs.dry_run || github.event_name == 'pull_request' }}
release_tag: ${{ needs.validate.outputs.release_tag }}
github_release: 'false' # bt-publishing-test: omit GitHub release to avoid tag/release pollution from repeated test runs
Expand Down
9 changes: 8 additions & 1 deletion actions/release/lang/js/publish/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,11 @@ inputs:
node_version:
description: "Node version to use"
required: false
default: '22'
default: ''
node_version_file:
description: "Path to a node version file (.tool-versions, .nvmrc, .node-version), relative to the repo root"
required: false
default: ''
pnpm_version:
description: "pnpm version to install (when package_manager is pnpm)"
required: false
Expand Down Expand Up @@ -145,7 +149,10 @@ runs:
- name: Set up Node
uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
with:
# Explicit node_version wins (setup-node prefers node-version when set); node_version_file
# (.tool-versions / .nvmrc / .node-version) is the fallback. Provide one of the two.
node-version: ${{ inputs.node_version }}
node-version-file: ${{ inputs.node_version_file }}
registry-url: ${{ inputs.registry }}
cache: ${{ inputs.package_manager }}
cache-dependency-path: |
Expand Down
9 changes: 8 additions & 1 deletion actions/release/lang/js/validate/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,11 @@ inputs:
node_version:
description: "Node version to use"
required: false
default: '22'
default: ''
node_version_file:
description: "Path to a node version file (.tool-versions, .nvmrc, .node-version), relative to the repo root"
required: false
default: ''
pnpm_version:
description: "pnpm version to install (when package_manager is pnpm)"
required: false
Expand Down Expand Up @@ -101,7 +105,10 @@ runs:
- name: Set up Node
uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
with:
# Explicit node_version wins (setup-node prefers node-version when set); node_version_file
# (.tool-versions / .nvmrc / .node-version) is the fallback. Provide one of the two.
node-version: ${{ inputs.node_version }}
node-version-file: ${{ inputs.node_version_file }}
registry-url: ${{ inputs.registry }}
cache: ${{ inputs.package_manager }}
cache-dependency-path: |
Expand Down
2 changes: 1 addition & 1 deletion actions/release/lang/ruby/publish/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ inputs:
required: false
default: '.'
ruby_version:
description: "Ruby version to use"
description: "Ruby version to use, or a version file path (.tool-versions, .ruby-version)"
required: false
default: '4.0'
dry_run:
Expand Down
2 changes: 1 addition & 1 deletion actions/release/lang/ruby/validate/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ inputs:
required: false
default: '.'
ruby_version:
description: "Ruby version to use"
description: "Ruby version to use, or a version file path (.tool-versions, .ruby-version)"
required: false
default: '4.0'
outputs:
Expand Down
6 changes: 5 additions & 1 deletion templates/actions/release/lang/js/publish.yml.erb
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,11 @@ inputs:
node_version:
description: "Node version to use"
required: false
default: '22'
default: ''
node_version_file:
description: "Path to a node version file (.tool-versions, .nvmrc, .node-version), relative to the repo root"
required: false
default: ''
pnpm_version:
description: "pnpm version to install (when package_manager is pnpm)"
required: false
Expand Down
6 changes: 5 additions & 1 deletion templates/actions/release/lang/js/validate.yml.erb
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,11 @@ inputs:
node_version:
description: "Node version to use"
required: false
default: '22'
default: ''
node_version_file:
description: "Path to a node version file (.tool-versions, .nvmrc, .node-version), relative to the repo root"
required: false
default: ''
pnpm_version:
description: "pnpm version to install (when package_manager is pnpm)"
required: false
Expand Down
2 changes: 1 addition & 1 deletion templates/actions/release/lang/ruby/publish.yml.erb
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ inputs:
required: false
default: '.'
ruby_version:
description: "Ruby version to use"
description: "Ruby version to use, or a version file path (.tool-versions, .ruby-version)"
required: false
default: '4.0'
dry_run:
Expand Down
2 changes: 1 addition & 1 deletion templates/actions/release/lang/ruby/validate.yml.erb
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ inputs:
required: false
default: '.'
ruby_version:
description: "Ruby version to use"
description: "Ruby version to use, or a version file path (.tool-versions, .ruby-version)"
required: false
default: '4.0'
outputs:
Expand Down
7 changes: 6 additions & 1 deletion templates/steps/lang/js/setup.yml.erb
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,9 @@
install — genuine control flow that can't be a shell self-guard because the
pnpm install is a `uses:` action, not a `run:` step.

@param node_version [String] expr for the Node version. Default: ${{ inputs.node_version }}
@param node_version [String] expr for an explicit Node version. Wins when set. Default: ${{ inputs.node_version }}
@param node_version_file [String] expr for a node version FILE (.tool-versions / .nvmrc /
.node-version), used when node_version is empty. Default: ${{ inputs.node_version_file }}
@param package_manager [String] expr for pnpm | npm | yarn. Default: ${{ inputs.package_manager }}
@param pnpm_version [String] expr for the pnpm version (pnpm). Default: ${{ inputs.pnpm_version }}
@param registry [String] expr for the npm registry URL. Default: ${{ inputs.registry }}
Expand All @@ -19,7 +21,10 @@
- name: Set up Node
uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
with:
# Explicit node_version wins (setup-node prefers node-version when set); node_version_file
# (.tool-versions / .nvmrc / .node-version) is the fallback. Provide one of the two.
node-version: <%= locals.fetch(:node_version) { "${{ inputs.node_version }}" } %>
node-version-file: <%= locals.fetch(:node_version_file) { "${{ inputs.node_version_file }}" } %>
registry-url: <%= locals.fetch(:registry) { "${{ inputs.registry }}" } %>
cache: <%= locals.fetch(:package_manager) { "${{ inputs.package_manager }}" } %>
cache-dependency-path: |
Expand Down
3 changes: 2 additions & 1 deletion templates/steps/lang/ruby/setup.yml.erb
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
<%#
Installs Ruby and the bundle (with caching) for the gem.

@param ruby_version [String] expr for the Ruby version. Default: ${{ inputs.ruby_version }}
@param ruby_version [String] expr for the Ruby version. Also accepts a version file
path (.tool-versions / .ruby-version) — ruby/setup-ruby reads it. Default: ${{ inputs.ruby_version }}
@param working_directory [String] expr for the gem root. Default: ${{ inputs.working_directory }}
-%>
- name: Set up Ruby
Expand Down
1 change: 1 addition & 0 deletions test/release/js/.tool-versions
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
nodejs 22.15.0