Skip to content

OpenDaimon 1.1.0

OpenDaimon 1.1.0 #14

Workflow file for this run

name: Publish CLI to npm
on:
release:
types: [published]
workflow_dispatch:
inputs:
version:
description: 'Version to publish (e.g. 1.0.1). Required for manual runs.'
required: true
type: string
jobs:
publish:
runs-on: ubuntu-latest
permissions:
contents: read
id-token: write
steps:
- uses: actions/checkout@v4
- name: Update npm to OIDC-capable version
run: sudo npm install -g npm@latest
- uses: actions/setup-node@v4
with:
node-version: '22'
registry-url: 'https://registry.npmjs.org'
- name: Resolve version
id: version
run: |
if [ -n "${{ github.event.inputs.version }}" ]; then
echo "version=${{ github.event.inputs.version }}" >> "$GITHUB_OUTPUT"
else
echo "version=${{ github.event.release.tag_name }}" >> "$GITHUB_OUTPUT"
fi
- name: Set package version
run: cd cli && npm version "${{ steps.version.outputs.version }}" --no-git-tag-version --allow-same-version
- name: Install dependencies
run: cd cli && npm ci
- name: Publish to npm
run: cd cli && npm publish --access public --provenance
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}