mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-30 09:27:13 +00:00
chore(ci): use release text instead of manually approval (#4660)
This commit is contained in:
parent
867e8e1e84
commit
0f7b07f8c1
@ -121,12 +121,16 @@ jobs:
|
|||||||
- run:
|
- run:
|
||||||
name: release
|
name: release
|
||||||
command: |
|
command: |
|
||||||
echo "//registry.npmjs.org/:_authToken=$NPM_TOKEN" >> ~/.npmrc
|
if echo "$COMMIT_MSG" | grep -o "\[release\]"; then
|
||||||
echo "//registry.yarnpkg.com/:_authToken=$NPM_TOKEN" >> ~/.npmrc
|
echo "//registry.npmjs.org/:_authToken=$NPM_TOKEN" >> ~/.npmrc
|
||||||
yarn lerna version --yes --no-git-tag-version --no-push
|
echo "//registry.yarnpkg.com/:_authToken=$NPM_TOKEN" >> ~/.npmrc
|
||||||
PACKAGE_SUFFIX=edge yarn build
|
yarn lerna version --yes --no-git-tag-version --no-push
|
||||||
if [ "$CIRCLE_BRANCH" = "next" ]; then tag="--tag next"; fi
|
PACKAGE_SUFFIX=edge yarn build
|
||||||
./scripts/workspace-run npm publish $tag -q
|
if [ "$CIRCLE_BRANCH" = "next" ]; then tag="--tag next"; fi
|
||||||
|
./scripts/workspace-run npm publish $tag -q
|
||||||
|
else
|
||||||
|
echo "Release phase is skipped."
|
||||||
|
fi
|
||||||
|
|
||||||
# Workflow definition
|
# Workflow definition
|
||||||
workflows:
|
workflows:
|
||||||
@ -142,16 +146,12 @@ workflows:
|
|||||||
- build: { requires: [setup] }
|
- build: { requires: [setup] }
|
||||||
- test-unit: { requires: [build] }
|
- test-unit: { requires: [build] }
|
||||||
- test-e2e: { requires: [build] }
|
- test-e2e: { requires: [build] }
|
||||||
- release-approval:
|
- release:
|
||||||
type: approval
|
|
||||||
requires: [build, lint, audit, test-unit, test-e2e]
|
requires: [build, lint, audit, test-unit, test-e2e]
|
||||||
filters:
|
filters:
|
||||||
<<: *release_branches
|
<<: *release_branches
|
||||||
- release:
|
environment:
|
||||||
requires:
|
COMMIT_MSG: $(git log --format=oneline -n 1 $CIRCLE_SHA1)
|
||||||
- release-approval
|
|
||||||
filters:
|
|
||||||
<<: *release_branches
|
|
||||||
|
|
||||||
# Release nightly builds on release branches
|
# Release nightly builds on release branches
|
||||||
nightly:
|
nightly:
|
||||||
@ -162,7 +162,10 @@ workflows:
|
|||||||
- build: { requires: [setup] }
|
- build: { requires: [setup] }
|
||||||
- test-unit: { requires: [build] }
|
- test-unit: { requires: [build] }
|
||||||
- test-e2e: { requires: [build] }
|
- test-e2e: { requires: [build] }
|
||||||
- release: { requires: [build, lint, audit, test-unit, test-e2e] }
|
- release:
|
||||||
|
requires: [build, lint, audit, test-unit, test-e2e]
|
||||||
|
environment:
|
||||||
|
COMMIT_MSG: '[release]'
|
||||||
triggers:
|
triggers:
|
||||||
- schedule:
|
- schedule:
|
||||||
cron: "0 0 * * *"
|
cron: "0 0 * * *"
|
||||||
|
Loading…
Reference in New Issue
Block a user