metro/circle.yml

115 lines
2.9 KiB
YAML
Raw Normal View History

Setup Continuous Delivery Summary: <!-- Thanks for submitting a pull request! Please provide enough information so that others can review your pull request. The two fields below are mandatory. --> **Summary** As we discussed on Discord channel on Nov 6th, this PR adds appropriate hooks to CircleCI in order to deploy successful builds (on master branch) to `npm` using tag that has been assigned to the latest commit. This is how deployment process should look like: Once you want to deploy, push a new tag to master. That will trigger a deployment script on CI. [According to CircleCI documentation](https://circleci.com/docs/1.0/npm-continuous-deployment/), the best way is to use ``` npm version x.y.z ``` in order to update package version and create git tag. Then, you can push your code using ``` git push --follow-tags ``` After successful build, a new version will be released. <!-- Explain the **motivation** for making this change. What existing problem does the pull request solve? --> **Test plan** Not sure if there is a way to properly test it before the merge. I think the only way is to merge it in, setup NPM_TOKEN env variable and try to create a new version by running build on CI. Please, let me know if you see alternative scenarios. <!-- Demonstrate the code is solid. Example: The exact commands you ran and their output, screenshots / videos if the pull request changes UI. --> Closes https://github.com/facebook/metro-bundler/pull/88 Reviewed By: BYK, cpojer Differential Revision: D6332813 Pulled By: rafeca fbshipit-source-id: 1902afa8eb77a59e813cefc8e7f650a0106edfef
2017-11-17 11:25:17 +00:00
aliases:
- &restore-cache
keys:
- dependencies-{{ .Branch }}-{{ checksum "package.json" }}
# Fallback in case checksum fails
- dependencies-{{ .Branch }}-
Setup Continuous Delivery Summary: <!-- Thanks for submitting a pull request! Please provide enough information so that others can review your pull request. The two fields below are mandatory. --> **Summary** As we discussed on Discord channel on Nov 6th, this PR adds appropriate hooks to CircleCI in order to deploy successful builds (on master branch) to `npm` using tag that has been assigned to the latest commit. This is how deployment process should look like: Once you want to deploy, push a new tag to master. That will trigger a deployment script on CI. [According to CircleCI documentation](https://circleci.com/docs/1.0/npm-continuous-deployment/), the best way is to use ``` npm version x.y.z ``` in order to update package version and create git tag. Then, you can push your code using ``` git push --follow-tags ``` After successful build, a new version will be released. <!-- Explain the **motivation** for making this change. What existing problem does the pull request solve? --> **Test plan** Not sure if there is a way to properly test it before the merge. I think the only way is to merge it in, setup NPM_TOKEN env variable and try to create a new version by running build on CI. Please, let me know if you see alternative scenarios. <!-- Demonstrate the code is solid. Example: The exact commands you ran and their output, screenshots / videos if the pull request changes UI. --> Closes https://github.com/facebook/metro-bundler/pull/88 Reviewed By: BYK, cpojer Differential Revision: D6332813 Pulled By: rafeca fbshipit-source-id: 1902afa8eb77a59e813cefc8e7f650a0106edfef
2017-11-17 11:25:17 +00:00
- &save-cache
paths:
- node_modules
key: dependencies-{{ .Branch }}-{{ checksum "package.json" }}
- &deploy-website
command: |
# Deploy Metro website
git config --global user.email "metro-bot@users.noreply.github.com"
git config --global user.name "Website Deployment Script"
echo "machine github.com login metro-bot password $GITHUB_TOKEN" > ~/.netrc
# install Docusaurus and generate file of English strings
cd website && yarn && yarn run write-translations
# build and publish website
GIT_USER=metro-bot yarn run publish-gh-pages
Setup Continuous Delivery Summary: <!-- Thanks for submitting a pull request! Please provide enough information so that others can review your pull request. The two fields below are mandatory. --> **Summary** As we discussed on Discord channel on Nov 6th, this PR adds appropriate hooks to CircleCI in order to deploy successful builds (on master branch) to `npm` using tag that has been assigned to the latest commit. This is how deployment process should look like: Once you want to deploy, push a new tag to master. That will trigger a deployment script on CI. [According to CircleCI documentation](https://circleci.com/docs/1.0/npm-continuous-deployment/), the best way is to use ``` npm version x.y.z ``` in order to update package version and create git tag. Then, you can push your code using ``` git push --follow-tags ``` After successful build, a new version will be released. <!-- Explain the **motivation** for making this change. What existing problem does the pull request solve? --> **Test plan** Not sure if there is a way to properly test it before the merge. I think the only way is to merge it in, setup NPM_TOKEN env variable and try to create a new version by running build on CI. Please, let me know if you see alternative scenarios. <!-- Demonstrate the code is solid. Example: The exact commands you ran and their output, screenshots / videos if the pull request changes UI. --> Closes https://github.com/facebook/metro-bundler/pull/88 Reviewed By: BYK, cpojer Differential Revision: D6332813 Pulled By: rafeca fbshipit-source-id: 1902afa8eb77a59e813cefc8e7f650a0106edfef
2017-11-17 11:25:17 +00:00
version: 2
jobs:
run-js-checks:
working_directory: ~/metro
docker:
- image: circleci/node:8
steps:
- checkout
- restore-cache: *restore-cache
- run: yarn --no-progress
- save-cache: *save-cache
- run: yarn run test-ci
Setup Continuous Delivery Summary: <!-- Thanks for submitting a pull request! Please provide enough information so that others can review your pull request. The two fields below are mandatory. --> **Summary** As we discussed on Discord channel on Nov 6th, this PR adds appropriate hooks to CircleCI in order to deploy successful builds (on master branch) to `npm` using tag that has been assigned to the latest commit. This is how deployment process should look like: Once you want to deploy, push a new tag to master. That will trigger a deployment script on CI. [According to CircleCI documentation](https://circleci.com/docs/1.0/npm-continuous-deployment/), the best way is to use ``` npm version x.y.z ``` in order to update package version and create git tag. Then, you can push your code using ``` git push --follow-tags ``` After successful build, a new version will be released. <!-- Explain the **motivation** for making this change. What existing problem does the pull request solve? --> **Test plan** Not sure if there is a way to properly test it before the merge. I think the only way is to merge it in, setup NPM_TOKEN env variable and try to create a new version by running build on CI. Please, let me know if you see alternative scenarios. <!-- Demonstrate the code is solid. Example: The exact commands you ran and their output, screenshots / videos if the pull request changes UI. --> Closes https://github.com/facebook/metro-bundler/pull/88 Reviewed By: BYK, cpojer Differential Revision: D6332813 Pulled By: rafeca fbshipit-source-id: 1902afa8eb77a59e813cefc8e7f650a0106edfef
2017-11-17 11:25:17 +00:00
test-node-9:
working_directory: ~/metro
Setup Continuous Delivery Summary: <!-- Thanks for submitting a pull request! Please provide enough information so that others can review your pull request. The two fields below are mandatory. --> **Summary** As we discussed on Discord channel on Nov 6th, this PR adds appropriate hooks to CircleCI in order to deploy successful builds (on master branch) to `npm` using tag that has been assigned to the latest commit. This is how deployment process should look like: Once you want to deploy, push a new tag to master. That will trigger a deployment script on CI. [According to CircleCI documentation](https://circleci.com/docs/1.0/npm-continuous-deployment/), the best way is to use ``` npm version x.y.z ``` in order to update package version and create git tag. Then, you can push your code using ``` git push --follow-tags ``` After successful build, a new version will be released. <!-- Explain the **motivation** for making this change. What existing problem does the pull request solve? --> **Test plan** Not sure if there is a way to properly test it before the merge. I think the only way is to merge it in, setup NPM_TOKEN env variable and try to create a new version by running build on CI. Please, let me know if you see alternative scenarios. <!-- Demonstrate the code is solid. Example: The exact commands you ran and their output, screenshots / videos if the pull request changes UI. --> Closes https://github.com/facebook/metro-bundler/pull/88 Reviewed By: BYK, cpojer Differential Revision: D6332813 Pulled By: rafeca fbshipit-source-id: 1902afa8eb77a59e813cefc8e7f650a0106edfef
2017-11-17 11:25:17 +00:00
docker:
- image: circleci/node:9
steps:
- checkout
- restore-cache: *restore-cache
- run: yarn --no-progress
- save-cache: *save-cache
- run: yarn run jest
Setup Continuous Delivery Summary: <!-- Thanks for submitting a pull request! Please provide enough information so that others can review your pull request. The two fields below are mandatory. --> **Summary** As we discussed on Discord channel on Nov 6th, this PR adds appropriate hooks to CircleCI in order to deploy successful builds (on master branch) to `npm` using tag that has been assigned to the latest commit. This is how deployment process should look like: Once you want to deploy, push a new tag to master. That will trigger a deployment script on CI. [According to CircleCI documentation](https://circleci.com/docs/1.0/npm-continuous-deployment/), the best way is to use ``` npm version x.y.z ``` in order to update package version and create git tag. Then, you can push your code using ``` git push --follow-tags ``` After successful build, a new version will be released. <!-- Explain the **motivation** for making this change. What existing problem does the pull request solve? --> **Test plan** Not sure if there is a way to properly test it before the merge. I think the only way is to merge it in, setup NPM_TOKEN env variable and try to create a new version by running build on CI. Please, let me know if you see alternative scenarios. <!-- Demonstrate the code is solid. Example: The exact commands you ran and their output, screenshots / videos if the pull request changes UI. --> Closes https://github.com/facebook/metro-bundler/pull/88 Reviewed By: BYK, cpojer Differential Revision: D6332813 Pulled By: rafeca fbshipit-source-id: 1902afa8eb77a59e813cefc8e7f650a0106edfef
2017-11-17 11:25:17 +00:00
test-node-8:
working_directory: ~/metro
Setup Continuous Delivery Summary: <!-- Thanks for submitting a pull request! Please provide enough information so that others can review your pull request. The two fields below are mandatory. --> **Summary** As we discussed on Discord channel on Nov 6th, this PR adds appropriate hooks to CircleCI in order to deploy successful builds (on master branch) to `npm` using tag that has been assigned to the latest commit. This is how deployment process should look like: Once you want to deploy, push a new tag to master. That will trigger a deployment script on CI. [According to CircleCI documentation](https://circleci.com/docs/1.0/npm-continuous-deployment/), the best way is to use ``` npm version x.y.z ``` in order to update package version and create git tag. Then, you can push your code using ``` git push --follow-tags ``` After successful build, a new version will be released. <!-- Explain the **motivation** for making this change. What existing problem does the pull request solve? --> **Test plan** Not sure if there is a way to properly test it before the merge. I think the only way is to merge it in, setup NPM_TOKEN env variable and try to create a new version by running build on CI. Please, let me know if you see alternative scenarios. <!-- Demonstrate the code is solid. Example: The exact commands you ran and their output, screenshots / videos if the pull request changes UI. --> Closes https://github.com/facebook/metro-bundler/pull/88 Reviewed By: BYK, cpojer Differential Revision: D6332813 Pulled By: rafeca fbshipit-source-id: 1902afa8eb77a59e813cefc8e7f650a0106edfef
2017-11-17 11:25:17 +00:00
docker:
- image: circleci/node:8
steps:
- checkout
- restore-cache: *restore-cache
- run: yarn --no-progress
- save-cache: *save-cache
- run: yarn run jest
Setup Continuous Delivery Summary: <!-- Thanks for submitting a pull request! Please provide enough information so that others can review your pull request. The two fields below are mandatory. --> **Summary** As we discussed on Discord channel on Nov 6th, this PR adds appropriate hooks to CircleCI in order to deploy successful builds (on master branch) to `npm` using tag that has been assigned to the latest commit. This is how deployment process should look like: Once you want to deploy, push a new tag to master. That will trigger a deployment script on CI. [According to CircleCI documentation](https://circleci.com/docs/1.0/npm-continuous-deployment/), the best way is to use ``` npm version x.y.z ``` in order to update package version and create git tag. Then, you can push your code using ``` git push --follow-tags ``` After successful build, a new version will be released. <!-- Explain the **motivation** for making this change. What existing problem does the pull request solve? --> **Test plan** Not sure if there is a way to properly test it before the merge. I think the only way is to merge it in, setup NPM_TOKEN env variable and try to create a new version by running build on CI. Please, let me know if you see alternative scenarios. <!-- Demonstrate the code is solid. Example: The exact commands you ran and their output, screenshots / videos if the pull request changes UI. --> Closes https://github.com/facebook/metro-bundler/pull/88 Reviewed By: BYK, cpojer Differential Revision: D6332813 Pulled By: rafeca fbshipit-source-id: 1902afa8eb77a59e813cefc8e7f650a0106edfef
2017-11-17 11:25:17 +00:00
test-node-6:
working_directory: ~/metro
Setup Continuous Delivery Summary: <!-- Thanks for submitting a pull request! Please provide enough information so that others can review your pull request. The two fields below are mandatory. --> **Summary** As we discussed on Discord channel on Nov 6th, this PR adds appropriate hooks to CircleCI in order to deploy successful builds (on master branch) to `npm` using tag that has been assigned to the latest commit. This is how deployment process should look like: Once you want to deploy, push a new tag to master. That will trigger a deployment script on CI. [According to CircleCI documentation](https://circleci.com/docs/1.0/npm-continuous-deployment/), the best way is to use ``` npm version x.y.z ``` in order to update package version and create git tag. Then, you can push your code using ``` git push --follow-tags ``` After successful build, a new version will be released. <!-- Explain the **motivation** for making this change. What existing problem does the pull request solve? --> **Test plan** Not sure if there is a way to properly test it before the merge. I think the only way is to merge it in, setup NPM_TOKEN env variable and try to create a new version by running build on CI. Please, let me know if you see alternative scenarios. <!-- Demonstrate the code is solid. Example: The exact commands you ran and their output, screenshots / videos if the pull request changes UI. --> Closes https://github.com/facebook/metro-bundler/pull/88 Reviewed By: BYK, cpojer Differential Revision: D6332813 Pulled By: rafeca fbshipit-source-id: 1902afa8eb77a59e813cefc8e7f650a0106edfef
2017-11-17 11:25:17 +00:00
docker:
- image: circleci/node:6
steps:
- checkout
- restore-cache: *restore-cache
- run: sudo npm i -g yarn@^1.2.1
- run: yarn --no-progress
- save-cache: *save-cache
- run: yarn run jest
Setup Continuous Delivery Summary: <!-- Thanks for submitting a pull request! Please provide enough information so that others can review your pull request. The two fields below are mandatory. --> **Summary** As we discussed on Discord channel on Nov 6th, this PR adds appropriate hooks to CircleCI in order to deploy successful builds (on master branch) to `npm` using tag that has been assigned to the latest commit. This is how deployment process should look like: Once you want to deploy, push a new tag to master. That will trigger a deployment script on CI. [According to CircleCI documentation](https://circleci.com/docs/1.0/npm-continuous-deployment/), the best way is to use ``` npm version x.y.z ``` in order to update package version and create git tag. Then, you can push your code using ``` git push --follow-tags ``` After successful build, a new version will be released. <!-- Explain the **motivation** for making this change. What existing problem does the pull request solve? --> **Test plan** Not sure if there is a way to properly test it before the merge. I think the only way is to merge it in, setup NPM_TOKEN env variable and try to create a new version by running build on CI. Please, let me know if you see alternative scenarios. <!-- Demonstrate the code is solid. Example: The exact commands you ran and their output, screenshots / videos if the pull request changes UI. --> Closes https://github.com/facebook/metro-bundler/pull/88 Reviewed By: BYK, cpojer Differential Revision: D6332813 Pulled By: rafeca fbshipit-source-id: 1902afa8eb77a59e813cefc8e7f650a0106edfef
2017-11-17 11:25:17 +00:00
publish-to-npm:
working_directory: ~/metro
Setup Continuous Delivery Summary: <!-- Thanks for submitting a pull request! Please provide enough information so that others can review your pull request. The two fields below are mandatory. --> **Summary** As we discussed on Discord channel on Nov 6th, this PR adds appropriate hooks to CircleCI in order to deploy successful builds (on master branch) to `npm` using tag that has been assigned to the latest commit. This is how deployment process should look like: Once you want to deploy, push a new tag to master. That will trigger a deployment script on CI. [According to CircleCI documentation](https://circleci.com/docs/1.0/npm-continuous-deployment/), the best way is to use ``` npm version x.y.z ``` in order to update package version and create git tag. Then, you can push your code using ``` git push --follow-tags ``` After successful build, a new version will be released. <!-- Explain the **motivation** for making this change. What existing problem does the pull request solve? --> **Test plan** Not sure if there is a way to properly test it before the merge. I think the only way is to merge it in, setup NPM_TOKEN env variable and try to create a new version by running build on CI. Please, let me know if you see alternative scenarios. <!-- Demonstrate the code is solid. Example: The exact commands you ran and their output, screenshots / videos if the pull request changes UI. --> Closes https://github.com/facebook/metro-bundler/pull/88 Reviewed By: BYK, cpojer Differential Revision: D6332813 Pulled By: rafeca fbshipit-source-id: 1902afa8eb77a59e813cefc8e7f650a0106edfef
2017-11-17 11:25:17 +00:00
docker:
- image: circleci/node:8
steps:
- checkout
- restore-cache: *restore-cache
- run:
working_directory: packages/metro
Setup Continuous Delivery Summary: <!-- Thanks for submitting a pull request! Please provide enough information so that others can review your pull request. The two fields below are mandatory. --> **Summary** As we discussed on Discord channel on Nov 6th, this PR adds appropriate hooks to CircleCI in order to deploy successful builds (on master branch) to `npm` using tag that has been assigned to the latest commit. This is how deployment process should look like: Once you want to deploy, push a new tag to master. That will trigger a deployment script on CI. [According to CircleCI documentation](https://circleci.com/docs/1.0/npm-continuous-deployment/), the best way is to use ``` npm version x.y.z ``` in order to update package version and create git tag. Then, you can push your code using ``` git push --follow-tags ``` After successful build, a new version will be released. <!-- Explain the **motivation** for making this change. What existing problem does the pull request solve? --> **Test plan** Not sure if there is a way to properly test it before the merge. I think the only way is to merge it in, setup NPM_TOKEN env variable and try to create a new version by running build on CI. Please, let me know if you see alternative scenarios. <!-- Demonstrate the code is solid. Example: The exact commands you ran and their output, screenshots / videos if the pull request changes UI. --> Closes https://github.com/facebook/metro-bundler/pull/88 Reviewed By: BYK, cpojer Differential Revision: D6332813 Pulled By: rafeca fbshipit-source-id: 1902afa8eb77a59e813cefc8e7f650a0106edfef
2017-11-17 11:25:17 +00:00
command: yarn --no-progress
- save-cache: *save-cache
- run:
command: echo "//registry.npmjs.org/:_authToken=$NPM_TOKEN" >> ~/.npmrc
- run:
working_directory: ~/metro
command: npm run publish
test-and-deploy-website:
working_directory: ~/metro
docker:
- image: circleci/node:8
steps:
- checkout
- restore-cache: *restore-cache
- run: |
cd website
yarn --no-progress
- save-cache: *save-cache
- deploy: *deploy-website
Setup Continuous Delivery Summary: <!-- Thanks for submitting a pull request! Please provide enough information so that others can review your pull request. The two fields below are mandatory. --> **Summary** As we discussed on Discord channel on Nov 6th, this PR adds appropriate hooks to CircleCI in order to deploy successful builds (on master branch) to `npm` using tag that has been assigned to the latest commit. This is how deployment process should look like: Once you want to deploy, push a new tag to master. That will trigger a deployment script on CI. [According to CircleCI documentation](https://circleci.com/docs/1.0/npm-continuous-deployment/), the best way is to use ``` npm version x.y.z ``` in order to update package version and create git tag. Then, you can push your code using ``` git push --follow-tags ``` After successful build, a new version will be released. <!-- Explain the **motivation** for making this change. What existing problem does the pull request solve? --> **Test plan** Not sure if there is a way to properly test it before the merge. I think the only way is to merge it in, setup NPM_TOKEN env variable and try to create a new version by running build on CI. Please, let me know if you see alternative scenarios. <!-- Demonstrate the code is solid. Example: The exact commands you ran and their output, screenshots / videos if the pull request changes UI. --> Closes https://github.com/facebook/metro-bundler/pull/88 Reviewed By: BYK, cpojer Differential Revision: D6332813 Pulled By: rafeca fbshipit-source-id: 1902afa8eb77a59e813cefc8e7f650a0106edfef
2017-11-17 11:25:17 +00:00
# Workflows enables us to run multiple jobs in parallel
workflows:
version: 2
build-and-deploy:
jobs:
- run-js-checks
Setup Continuous Delivery Summary: <!-- Thanks for submitting a pull request! Please provide enough information so that others can review your pull request. The two fields below are mandatory. --> **Summary** As we discussed on Discord channel on Nov 6th, this PR adds appropriate hooks to CircleCI in order to deploy successful builds (on master branch) to `npm` using tag that has been assigned to the latest commit. This is how deployment process should look like: Once you want to deploy, push a new tag to master. That will trigger a deployment script on CI. [According to CircleCI documentation](https://circleci.com/docs/1.0/npm-continuous-deployment/), the best way is to use ``` npm version x.y.z ``` in order to update package version and create git tag. Then, you can push your code using ``` git push --follow-tags ``` After successful build, a new version will be released. <!-- Explain the **motivation** for making this change. What existing problem does the pull request solve? --> **Test plan** Not sure if there is a way to properly test it before the merge. I think the only way is to merge it in, setup NPM_TOKEN env variable and try to create a new version by running build on CI. Please, let me know if you see alternative scenarios. <!-- Demonstrate the code is solid. Example: The exact commands you ran and their output, screenshots / videos if the pull request changes UI. --> Closes https://github.com/facebook/metro-bundler/pull/88 Reviewed By: BYK, cpojer Differential Revision: D6332813 Pulled By: rafeca fbshipit-source-id: 1902afa8eb77a59e813cefc8e7f650a0106edfef
2017-11-17 11:25:17 +00:00
- test-node-6
- test-node-8
- test-node-9
- test-and-deploy-website
- publish-to-npm:
Setup Continuous Delivery Summary: <!-- Thanks for submitting a pull request! Please provide enough information so that others can review your pull request. The two fields below are mandatory. --> **Summary** As we discussed on Discord channel on Nov 6th, this PR adds appropriate hooks to CircleCI in order to deploy successful builds (on master branch) to `npm` using tag that has been assigned to the latest commit. This is how deployment process should look like: Once you want to deploy, push a new tag to master. That will trigger a deployment script on CI. [According to CircleCI documentation](https://circleci.com/docs/1.0/npm-continuous-deployment/), the best way is to use ``` npm version x.y.z ``` in order to update package version and create git tag. Then, you can push your code using ``` git push --follow-tags ``` After successful build, a new version will be released. <!-- Explain the **motivation** for making this change. What existing problem does the pull request solve? --> **Test plan** Not sure if there is a way to properly test it before the merge. I think the only way is to merge it in, setup NPM_TOKEN env variable and try to create a new version by running build on CI. Please, let me know if you see alternative scenarios. <!-- Demonstrate the code is solid. Example: The exact commands you ran and their output, screenshots / videos if the pull request changes UI. --> Closes https://github.com/facebook/metro-bundler/pull/88 Reviewed By: BYK, cpojer Differential Revision: D6332813 Pulled By: rafeca fbshipit-source-id: 1902afa8eb77a59e813cefc8e7f650a0106edfef
2017-11-17 11:25:17 +00:00
filters:
branches:
ignore: /.*/
tags:
only: /v[0-9]+(\.[0-9]+)*/