Skip to content

Commit 98405db

Browse files
authored
feat(ci): automated releases
2 parents 3d530f7 + b563793 commit 98405db

File tree

20 files changed

+7287
-4107
lines changed

20 files changed

+7287
-4107
lines changed

.babelrc

Lines changed: 0 additions & 16 deletions
This file was deleted.

.eslintrc.js

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
module.exports = {
2+
parser: '@typescript-eslint/parser',
3+
extends: [
4+
'eslint:recommended',
5+
'plugin:@typescript-eslint/eslint-recommended',
6+
'plugin:@typescript-eslint/recommended', // uses the recommended rules from the @typescript-eslint/eslint-plugin
7+
],
8+
parserOptions: {
9+
ecmaVersion: 2018,
10+
sourceType: 'module',
11+
},
12+
ignorePatterns: [
13+
'dist',
14+
],
15+
rules: {
16+
'quotes': ['warn', 'single'],
17+
'indent': ['warn', 2, { 'SwitchCase': 1 }],
18+
'linebreak-style': ['warn', 'unix'],
19+
'semi': ['warn', 'always'],
20+
'comma-dangle': ['warn', 'always-multiline'],
21+
'dot-notation': 'warn',
22+
'eqeqeq': 'warn',
23+
'curly': ['warn', 'all'],
24+
'brace-style': ['warn'],
25+
'prefer-arrow-callback': ['warn'],
26+
'max-len': ['warn', 140],
27+
'no-console': ['warn'], // use the provided Homebridge log method instead
28+
'lines-between-class-members': ['warn', 'always', {'exceptAfterSingleLine': true}],
29+
'@typescript-eslint/explicit-function-return-type': 'off',
30+
'@typescript-eslint/no-non-null-assertion': 'off',
31+
'@typescript-eslint/camelcase': 'off',
32+
'@typescript-eslint/no-explicit-any': 'off',
33+
'@typescript-eslint/explicit-module-boundary-types': 'off'
34+
},
35+
};

.github/workflows/linter.yml

Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
---
2+
###########################
3+
###########################
4+
## Linter GitHub Actions ##
5+
###########################
6+
###########################
7+
name: Lint Code Base
8+
9+
#
10+
# Documentation:
11+
# https://help.github.com/en/articles/workflow-syntax-for-github-actions
12+
#
13+
14+
#############################
15+
# Start the job on all push #
16+
#############################
17+
on:
18+
push:
19+
branches-ignore:
20+
- 'main'
21+
22+
###############
23+
# Set the Job #
24+
###############
25+
jobs:
26+
build:
27+
# Name the Job
28+
name: Lint Code Base
29+
# Set the agent to run on
30+
runs-on: ubuntu-latest
31+
32+
##################
33+
# Load all steps #
34+
##################
35+
steps:
36+
##########################
37+
# Checkout the code base #
38+
##########################
39+
- name: Checkout Code
40+
uses: actions/checkout@v2
41+
42+
##########################
43+
# Github Super Linter needs
44+
# the latest definitions installed
45+
##########################
46+
- name: Use Node.js 14.x
47+
uses: actions/[email protected]
48+
with:
49+
node-version: 14.x
50+
- run: npm install
51+
52+
################################
53+
# Run Linter against code base #
54+
################################
55+
- name: Lint Code Base
56+
uses: docker://github/super-linter:v3
57+
env:
58+
LINTER_RULES_PATH: /
59+
DEFAULT_BRANCH: main
60+
VALIDATE_ALL_CODEBASE: true
61+
TYPESCRIPT_ES_CONFIG_FILE: .eslintrc.js
62+
VALIDATE_JAVASCRIPT_ES: true
63+
VALIDATE_JSON: true
64+
VALIDATE_MD: true
65+
VALIDATE_TYPESCRIPT_ES: true

.github/workflows/publish.yml

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
name: Node.js Package
2+
3+
on:
4+
pull_request:
5+
branches:
6+
- main
7+
push:
8+
branches:
9+
- main
10+
11+
jobs:
12+
build:
13+
runs-on: ubuntu-latest
14+
steps:
15+
- uses: actions/checkout@v2
16+
- uses: actions/[email protected]
17+
- run: npm install
18+
- run: npm run build
19+
- name: Semantic Release
20+
uses: cycjimmy/semantic-release-action@v2
21+
env:
22+
GITHUB_TOKEN: ${{ secrets.CI_GITHUB_TOKEN }}
23+
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}

.idea/aws.xml

Lines changed: 11 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/codeStyles/codeStyleConfig.xml

Lines changed: 5 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.npmignore

Lines changed: 132 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,132 @@
1+
# Ignore source code
2+
src
3+
4+
# ------------- Defaults ------------- #
5+
6+
# eslint
7+
.eslintrc
8+
9+
# typescript
10+
tsconfig.json
11+
12+
# vscode
13+
.vscode
14+
15+
# nodemon
16+
nodemon.json
17+
18+
# Logs
19+
logs
20+
*.log
21+
npm-debug.log*
22+
yarn-debug.log*
23+
yarn-error.log*
24+
lerna-debug.log*
25+
26+
# Diagnostic reports (https://nodejs.org/api/report.html)
27+
report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json
28+
29+
# Runtime data
30+
pids
31+
*.pid
32+
*.seed
33+
*.pid.lock
34+
35+
# Directory for instrumented libs generated by jscoverage/JSCover
36+
lib-cov
37+
38+
# Coverage directory used by tools like istanbul
39+
coverage
40+
*.lcov
41+
42+
# nyc test coverage
43+
.nyc_output
44+
45+
# Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files)
46+
.grunt
47+
48+
# Bower dependency directory (https://bower.io/)
49+
bower_components
50+
51+
# node-waf configuration
52+
.lock-wscript
53+
54+
# Compiled binary addons (https://nodejs.org/api/addons.html)
55+
build/Release
56+
57+
# Dependency directories
58+
node_modules/
59+
jspm_packages/
60+
61+
# Snowpack dependency directory (https://snowpack.dev/)
62+
web_modules/
63+
64+
# TypeScript cache
65+
*.tsbuildinfo
66+
67+
# Optional npm cache directory
68+
.npm
69+
70+
# Optional eslint cache
71+
.eslintcache
72+
73+
# Microbundle cache
74+
.rpt2_cache/
75+
.rts2_cache_cjs/
76+
.rts2_cache_es/
77+
.rts2_cache_umd/
78+
79+
# Optional REPL history
80+
.node_repl_history
81+
82+
# Output of 'npm pack'
83+
*.tgz
84+
85+
# Yarn Integrity file
86+
.yarn-integrity
87+
88+
# dotenv environment variables file
89+
.env
90+
.env.test
91+
92+
# parcel-bundler cache (https://parceljs.org/)
93+
.cache
94+
.parcel-cache
95+
96+
# Next.js build output
97+
.next
98+
99+
# Nuxt.js build / generate output
100+
.nuxt
101+
dist
102+
103+
# Gatsby files
104+
.cache/
105+
# Comment in the public line in if your project uses Gatsby and not Next.js
106+
# https://nextjs.org/blog/next-9-1#public-directory-support
107+
# public
108+
109+
# vuepress build output
110+
.vuepress/dist
111+
112+
# Serverless directories
113+
.serverless/
114+
115+
# FuseBox cache
116+
.fusebox/
117+
118+
# DynamoDB Local files
119+
.dynamodb/
120+
121+
# TernJS port file
122+
.tern-port
123+
124+
# Stores VSCode versions used for testing VSCode extensions
125+
.vscode-test
126+
127+
# yarn v2
128+
129+
.yarn/cache
130+
.yarn/unplugged
131+
.yarn/build-state.yml
132+
.pnp.*

README.md

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,25 @@
11
# node-flair-api
22
A node implementation of the Flair Smart Vent API
3+
4+
### Commit format
5+
6+
Commits should be formatted as `type(scope): message`
7+
8+
The following types are allowed:
9+
10+
| Type | Description |
11+
|---|---|
12+
| feat | A new feature |
13+
| fix | A bug fix |
14+
| docs | Documentation only changes |
15+
| style | Changes that do not affect the meaning of the code (white-space, formatting,missing semi-colons, etc) |
16+
| refactor | A code change that neither fixes a bug nor adds a feature |
17+
| perf | A code change that improves performance |
18+
| test | Adding missing or correcting existing tests |
19+
| chore | Changes to the build process or auxiliary tools and libraries such as documentation generation |
20+
21+
### Releasing
22+
23+
A new version is released when a merge or push to `main` occurs.
24+
25+
We use the rules at [default-release-rules.js](https://github.com/semantic-release/commit-analyzer/blob/master/lib/default-release-rules.js) as our guide to when a series of commits should create a release.

0 commit comments

Comments
 (0)