Files
core/.github/workflows/release.yml
T
chrnx 96d863d402
CI / build (pull_request) Successful in 24s
ci: use the NPM_AUTH secret for both Verdaccio and npmjs publishes
One secret name across forges: Gitea's NPM_AUTH (org-level) = the Verdaccio token for staging; GitHub's NPM_AUTH = the npmjs token for production. Each forge supplies its own value.

Signed-off-by: Diego Resendez <diego.resendez@zero-oneit.com>
2026-07-17 21:17:17 -05:00

27 lines
869 B
YAML

name: Release → npmjs
# Production publish. Runs on GITHUB ONLY, on a version tag (`v*`). Publishes the stable
# package (version from package.json) to the public npmjs registry under `latest`.
# The tag arrives via the promote workflow; the version should be stable (no prerelease)
# before tagging.
on:
push:
tags: ['v*']
jobs:
publish-prod:
if: ${{ github.server_url == 'https://github.com' }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: '22'
registry-url: 'https://registry.npmjs.org'
- run: npm ci
# `npm publish` runs prepublishOnly (lint + complexity + typecheck + test + build) first.
- name: Publish to npmjs
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_AUTH }}
run: npm publish --access public