ci: add stage/promote/release workflows for the two-forge pipeline
CI / build (pull_request) Successful in 23s
CI / build (pull_request) Successful in 23s
stage.yml (Gitea-only): publish package to Verdaccio under 'stg' tag on main merge. promote.yml (Gitea-only): mirror only main + version tags to GitHub. release.yml (GitHub-only): publish stable to npmjs on a v* tag. Forge is detected via github.server_url; secrets: VERDACCIO_TOKEN (Gitea), GH_PROMOTE_TOKEN (Gitea, set), NPM_TOKEN (GitHub, pending). Signed-off-by: Diego Resendez <diego.resendez@zero-oneit.com>
This commit is contained in:
3 files changed
+84
No files matched your search
@@ -0,0 +1,26 @@
|
||||
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_TOKEN }}
|
||||
run: npm publish --access public
|
||||
Reference in new issue
Block a user