Merge pull request 'release: promote stage fix to main' (#7) from develop into main
This commit was merged in pull request #7.
This commit is contained in:
commit
523e302012
1 file changed
+6
-3
@@ -2,8 +2,9 @@ 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), on every merge
|
||||||
# to main. Publishes the package as-is — version comes from package.json (a prerelease
|
# to main. Publishes the package as-is — version comes from package.json (a prerelease
|
||||||
# like 26.7.1-stg.N) — to the internal Verdaccio under the `stg` dist-tag. Verdaccio
|
# like 26.7.1-beta.N) — to the internal Verdaccio under the `stg` dist-tag. This registry
|
||||||
# allows overwrite, so re-publishing the same version is a no-op-ish refresh.
|
# rejects overwriting an existing version, so the step unpublishes it first (a no-op on the
|
||||||
|
# first publish) then publishes fresh.
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
branches: [main]
|
branches: [main]
|
||||||
@@ -20,9 +21,11 @@ jobs:
|
|||||||
- run: npm ci
|
- run: npm ci
|
||||||
# `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
|
- name: Publish to Verdaccio (unpublish + publish)
|
||||||
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")
|
||||||
|
npm unpublish "@green-tea/core@$VER" --registry https://npm.svc.zoit.services --force 2>/dev/null || true
|
||||||
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