Skip to content
Merged
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
15 changes: 9 additions & 6 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,19 +3,22 @@ name: Publish
on:
workflow_call:

permissions:
id-token: write # Required for OIDC
contents: read

jobs:
publish-caliper:
name: Publish Caliper
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Use Node.js 18.x
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version: 18.x
# anchor to the smallest npm version supporting trusted publishing
- name: Update npm
run: npm install -g npm@11.5.1
- name: Publish Caliper

@aklenik aklenik Sep 24, 2025

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd add these explicit steps (taken from the official docs at https://docs.npmjs.com/trusted-publishers#github-actions-configuration) before the "Publish Caliper" step, so we're sure that we have the required npm version (I couldn't find what npm version comes with 18.x when using setup-node):

# Ensure npm 11.5.1 or later is installed
- name: Update npm
  run: npm install -g npm@latest
- run: npm ci
- run: npm run build --if-present
- run: npm test
- run: npm publish
# rest is unchanged
- name: Publish Caliper

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

does this look good now?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ryjones I think the new block should go between L27-28 (according to the current commit, L15-16 in the previous version), just after the setup-node step

run: .build/publish-caliper.sh
env:
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
DOCKER_USER: ${{ secrets.DOCKERHUB_USERNAME }}
DOCKER_TOKEN: ${{ secrets.DOCKERHUB_TOKEN }}
Loading