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
5 changes: 2 additions & 3 deletions .github/actions/build/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,10 @@ runs:
using: composite

steps:
- name: Setup Node
uses: actions/setup-node@v3
- name: Setup Node and npm
uses: ./.github/actions/setup-node-npm
with:
node-version: ${{ inputs.node }}
cache: 'npm'

- name: Install dependencies
shell: bash
Expand Down
14 changes: 7 additions & 7 deletions .github/actions/npm-publish/action.yml
Original file line number Diff line number Diff line change
@@ -1,13 +1,18 @@
name: Publish release to npm
description: Publish SDK package to npm

inputs:
node-version:
description: Node.js version to use
required: true
version:
description: Version being published
required: true
require-build:
description: Whether to build before publishing
default: true
release-directory:
description: Directory to publish from
default: './'

runs:
Expand All @@ -17,17 +22,12 @@ runs:
- name: Checkout code
uses: actions/checkout@v4

- name: Setup Node
uses: actions/setup-node@v4
- name: Setup Node and npm
uses: ./.github/actions/setup-node-npm
with:
node-version: ${{ inputs.node-version }}
cache: 'npm'
registry-url: 'https://registry.npmjs.org'

- name: Update npm to version 11
shell: bash
run: npm install -g npm@11

- name: Install dependencies
shell: bash
run: npm ci --include=dev
Expand Down
30 changes: 30 additions & 0 deletions .github/actions/setup-node-npm/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: Setup Node and npm
description: Setup Node.js and upgrade npm to version 11 for trusted publishing support

inputs:
node-version:
description: The Node version to use
required: false
default: '22'
cache:
description: Enable npm caching
required: false
default: 'npm'
registry-url:
description: Registry URL for publishing
required: false

runs:
using: composite

steps:
- name: Setup Node
uses: actions/setup-node@v6
with:
node-version: ${{ inputs.node-version }}
cache: ${{ inputs.cache }}
registry-url: ${{ inputs.registry-url }}

- name: Update npm to version 11
shell: bash
run: npm install -g npm@11
5 changes: 2 additions & 3 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -93,11 +93,10 @@ jobs:
fetch-depth: 0
ref: ${{ github.event.inputs.branch }}

- name: Setup Node
uses: actions/setup-node@v6
- name: Setup Node and npm
uses: ./.github/actions/setup-node-npm
with:
node-version: ${{ env.NODE_VERSION }}
cache: npm
registry-url: 'https://registry.npmjs.org'

- name: Install dependencies
Expand Down
Loading