Files
core/.github/workflows/stage.yml
T
chrnx aa3402bd84
Stage → Verdaccio / publish-stg (push) Successful in 21s
CI / build (pull_request) Successful in 36s
ci(release): stage prereleases from release branches
Keep develop free to accept concurrent changes while Verdaccio validates an immutable release candidate. Audit dependencies and reject stable versions before publishing.

Signed-off-by: Diego Resendez <diego.resendez@zero-oneit.com>
2026-08-02 21:43:16 -05:00

35 lines
1.3 KiB
YAML

name: Stage → Verdaccio
# Staging publish. Runs on GITEA ONLY (the `if` guards against GitHub) for release
# branches. Publishes the package as-is — version comes from package.json (a prerelease
# like 26.8.0-beta.N) — to the internal Verdaccio under the `stg` dist-tag. Published
# versions are immutable; fixes must increment the prerelease version.
on:
push:
branches: ['release/**']
jobs:
publish-stg:
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'
- run: npm ci
- run: npm audit
# `npm publish` runs prepublishOnly (lint + complexity + typecheck + test + build)
# as its own gate before anything leaves the machine.
- name: Publish prerelease to Verdaccio
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_AUTH }}
run: |
npm config set //npm.svc.zoit.services/:_authToken "$NODE_AUTH_TOKEN"
VER=$(node -p "require('./package.json').version")
case "$VER" in
*-*) ;;
*) echo "Refusing to stage non-prerelease version: $VER" >&2; exit 1 ;;
esac
npm publish --registry https://npm.svc.zoit.services --tag stg