Skip to content

NurCLI v0.44.0

NurCLI v0.44.0 #40

Workflow file for this run

# Publish the nur-cli npm shim via OIDC trusted publishing (no tokens, no 2FA).
#
# One-time setup on npmjs.com (package → Settings → Trusted Publisher):
# Organization or user: nuroctane
# Repository: nur-cli
# Workflow filename: publish-npm.yml
# Allowed actions: npm publish
#
# Requires npm CLI >= 11.5.1 + Node >= 22.14 on the runner (setup-node pins 24).
name: publish-npm
on:
release:
types: [published]
workflow_dispatch:
permissions:
id-token: write # Required for OIDC
contents: read
jobs:
validate:
uses: ./.github/workflows/validate.yml
publish:
needs: validate
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
- uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0
with:
node-version: "24"
registry-url: "https://registry.npmjs.org"
package-manager-cache: false # never use caching in release builds
# Release events: force the tag version. Manual runs: trust npm/package.json
# as committed (the shim version can lead the binary version).
- name: Sync package version on release tags
if: github.event_name == 'release'
run: |
cd npm
node -e "
const fs = require('fs');
const pkg = JSON.parse(fs.readFileSync('package.json', 'utf8'));
pkg.version = process.argv[1];
fs.writeFileSync('package.json', JSON.stringify(pkg, null, 2) + '\n');
" "${GITHUB_REF_NAME#v}"
- name: Publish from npm/
run: npm publish
working-directory: npm