ci: restore release workflow (#1185)

* ci: don't build our master branch

* Add netlify-cli as a dev dependency

* ci: trying a sheltered merge flow for promotions

* ci: try building with QUICK_BUILD flag

* Try using ~/repo prefix in command

* ci: make sure netlify command is available

* ci: use sudo for global command

* Inline personal access token w/ env var

* ci: workaround for sudo limitations

* ci: restore release workflow
This commit is contained in:
Danny Brown 2019-11-14 16:32:14 -05:00 committed by GitHub
parent 55a5f04923
commit 0797eff0b7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -32,8 +32,6 @@ jobs:
steps:
# Update yarn
- run: yarn -v
# Enable yarn workspaces
- run: yarn config set workspaces-experimental true
# Checkout code and ALL Git Tags
- checkout:
post:
@ -193,7 +191,8 @@ jobs:
steps:
- attach_workspace:
at: ~/repo
- run: npx netlify deploy --prod
- run: cd .netlify && npm install
- run: cd .netlify && npm run deploy
DEPLOY_TO_PRODUCTION:
docker:
@ -205,7 +204,8 @@ jobs:
steps:
- attach_workspace:
at: ~/repo
- run: npx netlify deploy --prod
- run: cd .netlify && npm install
- run: cd .netlify && npm run deploy
###
# Workflow: RELEASE
@ -213,8 +213,26 @@ jobs:
NPM_PUBLISH:
<<: *defaults
steps:
- attach_workspace:
at: ~/repo
# Update yarn
- run: yarn -v
# Checkout code and ALL Git Tags
- checkout:
post:
- git fetch --all
- restore_cache:
name: Restore Yarn and Cypress Package Cache
keys:
# when lock file changes, use increasingly general patterns to restore cache
- yarn-packages-{{ checksum "yarn.lock" }}
- yarn-packages-
- run:
name: Install Dependencies
command: yarn install --frozen-lockfile
- save_cache:
name: Save Yarn Package Cache
paths:
- ~/.cache ## Cache yarn and Cypress
key: yarn-packages-{{ checksum "yarn.lock" }}
- run:
name: Avoid hosts unknown for github
command:
@ -428,15 +446,19 @@ workflows:
- DEPLOY_TO_PRODUCTION:
requires:
- PROMOTE_TO_PRODUCTION
# Unit and E2E tests have already run for PR_CHECKS
# Re-running should not gain us any confidence here
# RELEASE:
# jobs:
# - NPM_PUBLISH:
# filters:
# branches:
# only: master
# - DOCS_PUBLISH
# - DOCKER_MASTER_PUBLISH:
# requires:
# - NPM_PUBLISH
RELEASE:
jobs:
- NPM_PUBLISH:
filters:
branches:
only: master
- DOCS_PUBLISH:
filters:
branches:
only: master
- DOCKER_MASTER_PUBLISH:
requires:
- NPM_PUBLISH