Compare commits
7
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
05e59383f1 | ||
|
|
97a146a758 | ||
|
|
aa3402bd84 | ||
|
|
813a29001b | ||
|
|
8d923e053c | ||
|
|
523e302012 | ||
|
|
e068426582 |
@@ -1,13 +1,12 @@
|
|||||||
name: Stage → Verdaccio
|
name: Stage → Verdaccio
|
||||||
|
|
||||||
# Staging publish. Runs on GITEA ONLY (the `if` guards against GitHub), on every merge
|
# Staging publish. Runs on GITEA ONLY (the `if` guards against GitHub) for release
|
||||||
# to main. Publishes the package as-is — version comes from package.json (a prerelease
|
# branches. Publishes the package as-is — version comes from package.json (a prerelease
|
||||||
# like 26.7.1-beta.N) — to the internal Verdaccio under the `stg` dist-tag. This registry
|
# like 26.8.0-beta.N) — to the internal Verdaccio under the `stg` dist-tag. Published
|
||||||
# rejects overwriting an existing version, so the step unpublishes it first (a no-op on the
|
# versions are immutable; fixes must increment the prerelease version.
|
||||||
# first publish) then publishes fresh.
|
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
branches: [main]
|
branches: ['release/**']
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
publish-stg:
|
publish-stg:
|
||||||
@@ -19,13 +18,17 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
node-version: '22'
|
node-version: '22'
|
||||||
- run: npm ci
|
- run: npm ci
|
||||||
|
- run: npm audit
|
||||||
# `npm publish` runs prepublishOnly (lint + complexity + typecheck + test + build)
|
# `npm publish` runs prepublishOnly (lint + complexity + typecheck + test + build)
|
||||||
# as its own gate before anything leaves the machine.
|
# as its own gate before anything leaves the machine.
|
||||||
- name: Publish to Verdaccio (unpublish + publish)
|
- name: Publish prerelease to Verdaccio
|
||||||
env:
|
env:
|
||||||
NODE_AUTH_TOKEN: ${{ secrets.NPM_AUTH }}
|
NODE_AUTH_TOKEN: ${{ secrets.NPM_AUTH }}
|
||||||
run: |
|
run: |
|
||||||
npm config set //npm.svc.zoit.services/:_authToken "$NODE_AUTH_TOKEN"
|
npm config set //npm.svc.zoit.services/:_authToken "$NODE_AUTH_TOKEN"
|
||||||
VER=$(node -p "require('./package.json').version")
|
VER=$(node -p "require('./package.json').version")
|
||||||
npm unpublish "@green-tea/core@$VER" --registry https://npm.svc.zoit.services --force 2>/dev/null || true
|
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
|
npm publish --registry https://npm.svc.zoit.services --tag stg
|
||||||
Reference in new issue
Block a user