-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 893136f
Showing
30 changed files
with
15,557 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,92 @@ | ||
version: 2 | ||
|
||
aliases: | ||
# ------------------------- | ||
# ALIASES: Caches | ||
# ------------------------- | ||
- &restore-deps-cache | ||
key: deps-cache-{{ checksum "package.json" }} | ||
|
||
- &save-deps-cache | ||
key: deps-cache-{{ checksum "package.json" }} | ||
paths: | ||
- ~/project/node_modules | ||
|
||
# ------------------------- | ||
# ALIASES: Branch Filters | ||
# ------------------------- | ||
- &filter-only-master | ||
branches: | ||
only: master | ||
- &filter-only-semantic-pr | ||
branches: | ||
only: /^(pull|fix|feat|dependabot)\/.*$/ | ||
|
||
defaults: &defaults | ||
working_directory: ~/project | ||
|
||
jobs: | ||
test: | ||
<<: *defaults | ||
docker: | ||
- image: circleci/node:10 | ||
steps: | ||
- checkout | ||
- restore_cache: *restore-deps-cache | ||
- run: npm install | ||
- run: npm install codecov | ||
- run: npm test | ||
- run: ./node_modules/.bin/codecov | ||
- save_cache: *save-deps-cache | ||
|
||
build: | ||
<<: *defaults | ||
docker: | ||
- image: circleci/node:10 | ||
steps: | ||
- checkout | ||
- restore_cache: *restore-deps-cache | ||
- run: npm install | ||
- run: npm run build | ||
- run: npm run build:package | ||
- save_cache: *save-deps-cache | ||
|
||
release: | ||
<<: *defaults | ||
docker: | ||
- image: circleci/node:10 | ||
steps: | ||
- checkout | ||
- restore_cache: *restore-deps-cache | ||
- run: npm install | ||
- run: npm run build | ||
- run: npm run build:package | ||
- run: npm install semantic-release @semantic-release/changelog @semantic-release/git @semantic-release/github @semantic-release/npm @semantic-release/commit-analyzer @semantic-release/release-notes-generator @qiwi/semantic-release-gh-pages-plugin | ||
- run: ./node_modules/.bin/semantic-release | ||
- save_cache: *save-deps-cache | ||
|
||
workflows: | ||
version: 2 | ||
analysis: | ||
jobs: | ||
- test: | ||
filters: *filter-only-semantic-pr | ||
- build: | ||
filters: *filter-only-semantic-pr | ||
|
||
release: | ||
jobs: | ||
- test: | ||
filters: *filter-only-master | ||
- build: | ||
filters: *filter-only-master | ||
- hold: | ||
filters: *filter-only-master | ||
type: approval | ||
requires: | ||
- test | ||
- build | ||
- release: | ||
filters: *filter-only-master | ||
requires: | ||
- hold |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
# EditorConfig is awesome: http://EditorConfig.org | ||
|
||
# top-most EditorConfig file | ||
root = true | ||
|
||
# Unix-style newlines with a newline ending every file | ||
[*] | ||
indent_style = space | ||
indent_size = 2 | ||
tab_width = 2 | ||
end_of_line = lf | ||
charset = utf-8 | ||
trim_trailing_whitespace = true | ||
insert_final_newline = true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
--- | ||
name: Bug report | ||
about: Create a report to help us improve | ||
title: '' | ||
labels: '' | ||
assignees: '' | ||
|
||
--- | ||
|
||
**Describe the bug** | ||
A clear and concise description of what the bug is. | ||
|
||
**To Reproduce** | ||
Steps to reproduce the behavior: | ||
1. Go to '...' | ||
2. Click on '....' | ||
3. Scroll down to '....' | ||
4. See error | ||
|
||
**Expected behavior** | ||
A clear and concise description of what you expected to happen. | ||
|
||
**Screenshots** | ||
If applicable, add screenshots to help explain your problem. | ||
|
||
**Desktop (please complete the following information):** | ||
- OS: [e.g. iOS] | ||
- Browser [e.g. chrome, safari] | ||
- Version [e.g. 22] | ||
|
||
**Smartphone (please complete the following information):** | ||
- Device: [e.g. iPhone6] | ||
- OS: [e.g. iOS8.1] | ||
- Browser [e.g. stock browser, safari] | ||
- Version [e.g. 22] | ||
|
||
**Additional context** | ||
Add any other context about the problem here. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
--- | ||
name: Feature request | ||
about: Suggest an idea for this project | ||
title: '' | ||
labels: '' | ||
assignees: '' | ||
|
||
--- | ||
|
||
**Is your feature request related to a problem? Please describe.** | ||
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] | ||
|
||
**Describe the solution you'd like** | ||
A clear and concise description of what you want to happen. | ||
|
||
**Describe alternatives you've considered** | ||
A clear and concise description of any alternative solutions or features you've considered. | ||
|
||
**Additional context** | ||
Add any other context or screenshots about the feature request here. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
node_modules | ||
coverage | ||
build | ||
docs | ||
.DS_Store | ||
dist | ||
/**/build | ||
package/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
{ | ||
"tagFormat": "${version}", | ||
"branch": "master", | ||
"plugins": [ | ||
"@semantic-release/commit-analyzer", | ||
"@semantic-release/release-notes-generator", | ||
"@semantic-release/changelog", | ||
"@semantic-release/github", | ||
"@semantic-release/git", | ||
"@semantic-release/npm" | ||
], | ||
"verifyConditions": [ | ||
"@semantic-release/changelog", | ||
"@semantic-release/git", | ||
"@semantic-release/github", | ||
"@qiwi/semantic-release-gh-pages-plugin", | ||
"@semantic-release/npm" | ||
], | ||
"publish": [ | ||
"@semantic-release/github", | ||
{ | ||
"path": "@qiwi/semantic-release-gh-pages-plugin", | ||
"msg": "github pages release", | ||
"src": "build/", | ||
"branch": "gh-pages" | ||
}, | ||
"@semantic-release/npm" | ||
], | ||
"success": [ | ||
"@semantic-release/github" | ||
], | ||
"fail": [ | ||
"@semantic-release/github" | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,92 @@ | ||
# Building | ||
|
||
The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be interpreted as described in [BCP 14](https://tools.ietf.org/html/bcp14) [RFC2119](https://tools.ietf.org/html/rfc2119) [RFC8174](https://tools.ietf.org/html/rfc8174) when, and only when, they appear in all capitals, as shown here. | ||
|
||
This document is licensed under [The Apache License, Version 2.0](https://www.apache.org/licenses/LICENSE-2.0.html). | ||
|
||
## Introduction | ||
|
||
This document is to describe the functionality a project MUST provide in terms of creating build artifacts. It also describes the structure in which project's MUST write build artifacts in. | ||
|
||
A project MUST provide: | ||
|
||
- a folder name convention for build artifacts | ||
- a folder structure for the above-mentioned build artifacts folder | ||
- a list of targets | ||
- a file called `bin/build.{target}.{ext}` to target each of the build targets | ||
- a build pipeline given the above pretext | ||
|
||
The purpose of having a uniform way of producing a build is that we may ALL produce builds for any of the projects, making the onramp for new developers less steep, while still maintaining an exceptionally high level of quality. | ||
|
||
The projects should follow the 'architecture as code' principle - and should require a very minimal set of dependencies. | ||
|
||
It is the responsibilty of the build tooling to write artifacts to the appropriate location as outlined in this specification. | ||
|
||
## Build Folder Name | ||
|
||
The cannonical folder for builds SHALL be named `build` and be located at the root of the project repository. | ||
Each project MUST `git ignore` the `build` folder. | ||
|
||
## Build Folder Structure | ||
|
||
Files and folder names MUST be lowercase. | ||
The result of the build process should create a folder structure as follows: | ||
|
||
``` | ||
. | ||
└── build | ||
└── {target} | ||
└── {project-name}.{ext} | ||
``` | ||
|
||
|
||
Below is an example: | ||
``` | ||
. | ||
└── build | ||
└── windows | ||
└── my-build.exe | ||
``` | ||
|
||
## Build Targets | ||
|
||
Below is a list of suggested targets for a project | ||
1. windows | ||
2. linux | ||
3. macos | ||
|
||
## Build script | ||
|
||
Each release target MUST have a `bin/build.{target}.{ext}` file. | ||
|
||
The result of this is that every project MUST produce a build for each target when the following command is invoked: | ||
|
||
``` | ||
bin/build.{target}.{ext} | ||
``` | ||
|
||
The file MUST be placed in the project's `bin` directory. | ||
|
||
## Build Pipeline | ||
|
||
### Building targets | ||
|
||
`bin/build.{target}.{ext}` should create builds for each of the targets, and place the build artifacts in a folder structure outlined above. | ||
|
||
### Windows | ||
|
||
``` | ||
bin/build.windows.bat | ||
``` | ||
|
||
### Linux | ||
|
||
``` | ||
bin/build.linux.sh | ||
``` | ||
|
||
### Macos | ||
|
||
``` | ||
bin/build.macos.sh | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
## [1.0.2](https://github.com/etclabscore/pristine-typescript-react/compare/1.0.1...1.0.2) (2019-07-02) | ||
|
||
|
||
### Bug Fixes | ||
|
||
* add homepage to fix gh-pages ([dcb2099](https://github.com/etclabscore/pristine-typescript-react/commit/dcb2099)) | ||
|
||
## [1.0.1](https://github.com/etclabscore/pristine-typescript-react/compare/1.0.0...1.0.1) (2019-07-02) | ||
|
||
|
||
### Bug Fixes | ||
|
||
* **.releaserc:** remove npm publish ([2ee1fce](https://github.com/etclabscore/pristine-typescript-react/commit/2ee1fce)) | ||
|
||
# 1.0.0 (2019-07-02) | ||
|
||
|
||
### Bug Fixes | ||
|
||
* **jest:** use passWithNoTests ([f7fdd6c](https://github.com/etclabscore/pristine-typescript-react/commit/f7fdd6c)) | ||
|
||
|
||
### Features | ||
|
||
* initial commit ([2cf2f38](https://github.com/etclabscore/pristine-typescript-react/commit/2cf2f38)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
# CircleCI | ||
|
||
## Deploying | ||
|
||
Deploy by signing into [circleci.com](http://circleci.com/) with github. Add and set up your project. | ||
|
||
You can add your github token by clicking on a projects `settings` icon and going to `Environment Variables` and adding: | ||
|
||
### `GH_TOKEN` | ||
` | ||
[create a personal access token for a public github here](https://github.com/settings/tokens/new?scopes=public_repo). | ||
|
||
When creating the token, the minimum required scopes are: | ||
|
||
- repo for a private repository | ||
- public_repo for a public repository | ||
|
||
## HOLD | ||
|
||
Once set up properly it will be building a `workflow` that puts your `release` job `ON HOLD` until manually approved. This lets you batch up fixes and features into 1 release and still have the convenience of a 1 button deploy. | ||
|
||
## Github Releases | ||
On successfull release, it will create release notes and a new release and publish to github and github pages. | ||
|
||
## Github Pages | ||
|
||
You can view your deployed react site at the `homepage` url required to be changed in the `package.json` mentioned in the [README.md](README.md) |
Oops, something went wrong.