Skip to content

Commit 1501174

Browse files
authored
Add publish CI, contributing docs, reduce files that get published (#74)
1 parent b01e79a commit 1501174

File tree

7 files changed

+6587
-4829
lines changed

7 files changed

+6587
-4829
lines changed
Lines changed: 28 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -1,34 +1,28 @@
1-
# This workflow will do a clean install of node dependencies, build the source code and run tests across different versions of node
2-
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions
3-
4-
name: Node.js CI
5-
6-
on:
7-
push:
8-
branches: [ master ]
9-
pull_request:
10-
branches: [ master ]
11-
12-
jobs:
13-
build:
14-
15-
runs-on: ubuntu-latest
16-
17-
strategy:
18-
matrix:
19-
node-version: [10.x, 12.x, 14.x]
20-
21-
steps:
22-
- uses: actions/checkout@v2
23-
- name: Use Node.js ${{ matrix.node-version }}
24-
uses: actions/setup-node@v1
25-
with:
26-
node-version: ${{ matrix.node-version }}
27-
- run: npm i -g yarn
28-
- run: yarn
29-
- run: yarn build
30-
- run: yarn reflect
31-
- run: yarn isclean
32-
- run: yarn lint
33-
- run: yarn prettier
34-
- run: yarn test
1+
name: Node.js CI
2+
3+
on:
4+
push:
5+
branches: [ master ]
6+
pull_request:
7+
branches: [ master ]
8+
9+
jobs:
10+
build:
11+
runs-on: ubuntu-latest
12+
strategy:
13+
matrix:
14+
node-version: [10.x, 12.x, 14.x]
15+
steps:
16+
- uses: actions/checkout@v2
17+
- name: Use Node.js ${{ matrix.node-version }}
18+
uses: actions/setup-node@v1
19+
with:
20+
node-version: ${{ matrix.node-version }}
21+
- run: npm i -g yarn
22+
- run: yarn
23+
- run: yarn build
24+
- run: yarn reflect
25+
- run: yarn isclean
26+
- run: yarn lint
27+
- run: yarn prettier
28+
- run: yarn test

.github/workflows/publish.yml

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
name: Npm Publish
2+
3+
on:
4+
push:
5+
tags:
6+
- 'v:*'
7+
8+
jobs:
9+
publish:
10+
runs-on: ubuntu-latest
11+
steps:
12+
- uses: actions/checkout@v2
13+
- uses: actions/setup-node@v2
14+
with:
15+
node-version: 14.x
16+
- run: yarn
17+
- run: yarn build
18+
- run: yarn reflect
19+
- run: yarn isclean
20+
- run: yarn lint
21+
- run: yarn prettier
22+
- run: yarn test
23+
- uses: JS-DevTools/npm-publish@v1
24+
with:
25+
token: ${{ secrets.NPM_TOKEN }}
26+
dry-run: true # TODO remove this when feeling confident

CHANGELOG.md

Lines changed: 77 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -1,34 +1,78 @@
1-
# Changelog
2-
3-
This changelog is currently manually maintained. Please see commits, PRs and Issue discussions on GitHub for the latest and most correction information.
4-
5-
### 5.0.0
6-
7-
- Updated `calculateComplexity` signature, file extension and typescript/flow flags added
8-
9-
### 4.0.1
10-
11-
- Updated ts and npm config to properly expose types
12-
13-
### 4.0.0
14-
15-
- Added and exposed `calculateComplexity`
16-
- Refactored linting config
17-
- Removed more legacy config and code
18-
- Migrated to Jest
19-
- Fixed coverage
20-
21-
### 3.0.0
22-
23-
- Refactored available options
24-
- Made flow optional and disabled by default
25-
- Added GitHub pipeline config
26-
27-
### 2.0.0
28-
29-
- Removed lots of legacy/dead code that existed in 1.0.0
30-
- Migrated to TypeScript
31-
32-
### 1.0.0
33-
1+
# Changelog
2+
3+
This changelog is currently manually maintained. Please see commits, PRs and Issue discussions on GitHub for the latest and most correction information.
4+
5+
### 8.0.0
6+
7+
- Added new tooling for automating publishing and releasing
8+
- Added contributing docs
9+
- Removed sources from the published build
10+
11+
### 7.1.5
12+
13+
- Removed the npm engine restriction
14+
15+
### 7.1.0
16+
17+
- Adds badges (#53)
18+
- Strengthen build process
19+
- Convert tests to TypeScript (#55)
20+
- Adds the minimum threshold feature (#59)
21+
22+
### 7.0.1
23+
24+
- Add new results API (#49)
25+
- Fix lint and style errors, update CI to ensure lint and style errors can't be merged
26+
- Update CLI output to include longer filepaths and fix the formatting
27+
28+
### 6.1.1
29+
30+
- Allow config to exist in `package.json` instead of `codehawk.json`
31+
32+
### 6.0.3
33+
34+
- Update docs
35+
- Correct some logic around where the CLI is being executed
36+
37+
### 6.0.1
38+
39+
- Fix CLI bash context
40+
41+
### 6.0.0
42+
43+
- Added new CLI top level interface
44+
45+
### 5.0.1
46+
47+
- Correctly exposed types
48+
49+
### 5.0.0
50+
51+
- Updated `calculateComplexity` signature, file extension and typescript/flow flags added
52+
53+
### 4.0.1
54+
55+
- Updated ts and npm config to properly expose types
56+
57+
### 4.0.0
58+
59+
- Added and exposed `calculateComplexity`
60+
- Refactored linting config
61+
- Removed more legacy config and code
62+
- Migrated to Jest
63+
- Fixed coverage
64+
65+
### 3.0.0
66+
67+
- Refactored available options
68+
- Made flow optional and disabled by default
69+
- Added GitHub pipeline config
70+
71+
### 2.0.0
72+
73+
- Removed lots of legacy/dead code that existed in 1.0.0
74+
- Migrated to TypeScript
75+
76+
### 1.0.0
77+
3478
Initial release

CODE_OF_CONDUCT.md

Lines changed: 133 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,133 @@
1+
2+
# Contributor Covenant Code of Conduct
3+
4+
## Our Pledge
5+
6+
We as members, contributors, and leaders pledge to make participation in our
7+
community a harassment-free experience for everyone, regardless of age, body
8+
size, visible or invisible disability, ethnicity, sex characteristics, gender
9+
identity and expression, level of experience, education, socio-economic status,
10+
nationality, personal appearance, race, religion, or sexual identity
11+
and orientation.
12+
13+
We pledge to act and interact in ways that contribute to an open, welcoming,
14+
diverse, inclusive, and healthy community.
15+
16+
## Our Standards
17+
18+
Examples of behavior that contributes to a positive environment for our
19+
community include:
20+
21+
* Demonstrating empathy and kindness toward other people
22+
* Being respectful of differing opinions, viewpoints, and experiences
23+
* Giving and gracefully accepting constructive feedback
24+
* Accepting responsibility and apologizing to those affected by our mistakes,
25+
and learning from the experience
26+
* Focusing on what is best not just for us as individuals, but for the
27+
overall community
28+
29+
Examples of unacceptable behavior include:
30+
31+
* The use of sexualized language or imagery, and sexual attention or
32+
advances of any kind
33+
* Trolling, insulting or derogatory comments, and personal or political attacks
34+
* Public or private harassment
35+
* Publishing others' private information, such as a physical or email
36+
address, without their explicit permission
37+
* Other conduct which could reasonably be considered inappropriate in a
38+
professional setting
39+
40+
## Enforcement Responsibilities
41+
42+
Community leaders are responsible for clarifying and enforcing our standards of
43+
acceptable behavior and will take appropriate and fair corrective action in
44+
response to any behavior that they deem inappropriate, threatening, offensive,
45+
or harmful.
46+
47+
Community leaders have the right and responsibility to remove, edit, or reject
48+
comments, commits, code, wiki edits, issues, and other contributions that are
49+
not aligned to this Code of Conduct, and will communicate reasons for moderation
50+
decisions when appropriate.
51+
52+
## Scope
53+
54+
This Code of Conduct applies within all community spaces, and also applies when
55+
an individual is officially representing the community in public spaces.
56+
Examples of representing our community include using an official e-mail address,
57+
posting via an official social media account, or acting as an appointed
58+
representative at an online or offline event.
59+
60+
## Enforcement
61+
62+
Instances of abusive, harassing, or otherwise unacceptable behavior may be
63+
reported to the community leaders responsible for enforcement at
64+
sam@sgb.io.
65+
All complaints will be reviewed and investigated promptly and fairly.
66+
67+
All community leaders are obligated to respect the privacy and security of the
68+
reporter of any incident.
69+
70+
## Enforcement Guidelines
71+
72+
Community leaders will follow these Community Impact Guidelines in determining
73+
the consequences for any action they deem in violation of this Code of Conduct:
74+
75+
### 1. Correction
76+
77+
**Community Impact**: Use of inappropriate language or other behavior deemed
78+
unprofessional or unwelcome in the community.
79+
80+
**Consequence**: A private, written warning from community leaders, providing
81+
clarity around the nature of the violation and an explanation of why the
82+
behavior was inappropriate. A public apology may be requested.
83+
84+
### 2. Warning
85+
86+
**Community Impact**: A violation through a single incident or series
87+
of actions.
88+
89+
**Consequence**: A warning with consequences for continued behavior. No
90+
interaction with the people involved, including unsolicited interaction with
91+
those enforcing the Code of Conduct, for a specified period of time. This
92+
includes avoiding interactions in community spaces as well as external channels
93+
like social media. Violating these terms may lead to a temporary or
94+
permanent ban.
95+
96+
### 3. Temporary Ban
97+
98+
**Community Impact**: A serious violation of community standards, including
99+
sustained inappropriate behavior.
100+
101+
**Consequence**: A temporary ban from any sort of interaction or public
102+
communication with the community for a specified period of time. No public or
103+
private interaction with the people involved, including unsolicited interaction
104+
with those enforcing the Code of Conduct, is allowed during this period.
105+
Violating these terms may lead to a permanent ban.
106+
107+
### 4. Permanent Ban
108+
109+
**Community Impact**: Demonstrating a pattern of violation of community
110+
standards, including sustained inappropriate behavior, harassment of an
111+
individual, or aggression toward or disparagement of classes of individuals.
112+
113+
**Consequence**: A permanent ban from any sort of public interaction within
114+
the community.
115+
116+
## Attribution
117+
118+
This Code of Conduct is adapted from the [Contributor Covenant][homepage],
119+
version 2.0, available at
120+
[https://www.contributor-covenant.org/version/2/0/code_of_conduct.html][v2.0].
121+
122+
Community Impact Guidelines were inspired by
123+
[Mozilla's code of conduct enforcement ladder][Mozilla CoC].
124+
125+
For answers to common questions about this code of conduct, see the FAQ at
126+
[https://www.contributor-covenant.org/faq][FAQ]. Translations are available
127+
at [https://www.contributor-covenant.org/translations][translations].
128+
129+
[homepage]: https://www.contributor-covenant.org
130+
[v2.0]: https://www.contributor-covenant.org/version/2/0/code_of_conduct.html
131+
[Mozilla CoC]: https://github.com/mozilla/diversity
132+
[FAQ]: https://www.contributor-covenant.org/faq
133+
[translations]: https://www.contributor-covenant.org/translations

0 commit comments

Comments
 (0)