mirror of
https://github.com/nuxt/nuxt.git
synced 2025-01-31 07:40:33 +00:00
feat(circleci): add nightly build and manual releases
This commit is contained in:
parent
49a7d0c7f8
commit
ec99922429
@ -5,7 +5,13 @@ defaults: &defaults
|
|||||||
docker:
|
docker:
|
||||||
- image: banian/node-headless-chrome
|
- image: banian/node-headless-chrome
|
||||||
environment:
|
environment:
|
||||||
- NODE_ENV: test
|
NODE_ENV: test
|
||||||
|
|
||||||
|
release_branches: &release_branches
|
||||||
|
branches:
|
||||||
|
only:
|
||||||
|
- dev
|
||||||
|
- next
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
# --------------------------------------------------------------------------
|
# --------------------------------------------------------------------------
|
||||||
@ -115,52 +121,50 @@ jobs:
|
|||||||
- run:
|
- run:
|
||||||
name: release
|
name: release
|
||||||
command: |
|
command: |
|
||||||
GIT_COMMIT_MSG=`git --no-pager log --pretty=full -n1 $CIRCLE_SHA1`
|
|
||||||
if echo "$GIT_COMMIT_MSG" | grep -o "\[release\]"; then
|
|
||||||
echo "//registry.npmjs.org/:_authToken=$NPM_TOKEN" >> ~/.npmrc
|
echo "//registry.npmjs.org/:_authToken=$NPM_TOKEN" >> ~/.npmrc
|
||||||
echo "//registry.yarnpkg.com/:_authToken=$NPM_TOKEN" >> ~/.npmrc
|
echo "//registry.yarnpkg.com/:_authToken=$NPM_TOKEN" >> ~/.npmrc
|
||||||
yarn lerna version --yes --no-git-tag-version --no-push
|
yarn lerna version --yes --no-git-tag-version --no-push
|
||||||
PACKAGE_SUFFIX=edge yarn build
|
PACKAGE_SUFFIX=edge yarn build
|
||||||
if [ "$CIRCLE_BRANCH" = "next" ]; then tag="--tag next"; fi
|
if [ "$CIRCLE_BRANCH" = "next" ]; then tag="--tag next"; fi
|
||||||
./scripts/workspace-run npm publish $tag -q
|
./scripts/workspace-run npm publish $tag -q
|
||||||
fi
|
|
||||||
|
|
||||||
# Workflow definition
|
# Workflow definition
|
||||||
workflows:
|
workflows:
|
||||||
version: 2
|
version: 2
|
||||||
setup-and-test:
|
|
||||||
|
# Build and test after each commit
|
||||||
|
# Manually release on releas branches
|
||||||
|
commit:
|
||||||
jobs:
|
jobs:
|
||||||
- setup
|
- setup
|
||||||
|
- lint: { requires: [setup] }
|
||||||
- lint:
|
- audit: { requires: [setup] }
|
||||||
requires:
|
- build: { requires: [setup] }
|
||||||
- setup
|
- test-unit: { requires: [build] }
|
||||||
|
- test-e2e: { requires: [build] }
|
||||||
- audit:
|
- release-approval:
|
||||||
requires:
|
type: approval
|
||||||
- setup
|
requires: [build, lint, audit, test-unit, test-e2e]
|
||||||
|
filters:
|
||||||
- build:
|
<<: *release_branches
|
||||||
requires:
|
|
||||||
- setup
|
|
||||||
|
|
||||||
- test-unit:
|
|
||||||
requires:
|
|
||||||
- build
|
|
||||||
|
|
||||||
- test-e2e:
|
|
||||||
requires:
|
|
||||||
- build
|
|
||||||
|
|
||||||
- release:
|
- release:
|
||||||
requires:
|
requires:
|
||||||
- build
|
- release-approval
|
||||||
- lint
|
|
||||||
- audit
|
|
||||||
- test-unit
|
|
||||||
- test-e2e
|
|
||||||
filters:
|
filters:
|
||||||
branches:
|
<<: *release_branches
|
||||||
only:
|
|
||||||
- dev
|
# Release nightly builds on release branches
|
||||||
- next
|
nightly:
|
||||||
|
jobs:
|
||||||
|
- setup
|
||||||
|
- lint: { requires: [setup] }
|
||||||
|
- audit: { requires: [setup] }
|
||||||
|
- build: { requires: [setup] }
|
||||||
|
- test-unit: { requires: [build] }
|
||||||
|
- test-e2e: { requires: [build] }
|
||||||
|
- release: { requires: [build, lint, audit, test-unit, test-e2e] }
|
||||||
|
triggers:
|
||||||
|
- schedule:
|
||||||
|
cron: "0 0 * * *"
|
||||||
|
filters:
|
||||||
|
<<: *release_branches
|
||||||
|
Loading…
Reference in New Issue
Block a user