Skip to content

Commit e31be80

Browse files
Merge branch 'releases/v2'
# Conflicts: # .gitignore
2 parents 3d3948e + f8864ef commit e31be80

17 files changed

+29835
-406
lines changed

.commitlintrc.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
extends:
2+
- "@commitlint/config-conventional"

.eslintrc.yml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
env:
2+
es6: true
3+
node: true
4+
extends:
5+
- "plugin:@typescript-eslint/eslint-recommended"
6+
parser: "@typescript-eslint/parser"
7+
parserOptions:
8+
ecmaVersion: 2021
9+
sourceType: module
10+
plugins:
11+
- "@typescript-eslint"
12+
ignorePatterns:
13+
- "node_modules/*"

.gitignore

Lines changed: 46 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
1-
__tests__/runner/*
2-
3-
# comment out in distribution branches
1+
/.idea/
42
node_modules/
53

64
# Rest pulled from https://github.com/github/gitignore/blob/master/Node.gitignore
@@ -11,6 +9,7 @@ npm-debug.log*
119
yarn-debug.log*
1210
yarn-error.log*
1311
lerna-debug.log*
12+
.pnpm-debug.log*
1413

1514
# Diagnostic reports (https://nodejs.org/api/report.html)
1615
report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json
@@ -44,10 +43,11 @@ bower_components
4443
build/Release
4544

4645
# Dependency directories
46+
node_modules/
4747
jspm_packages/
4848

49-
# TypeScript v1 declaration files
50-
typings/
49+
# Snowpack dependency directory (https://snowpack.dev/)
50+
web_modules/
5151

5252
# TypeScript cache
5353
*.tsbuildinfo
@@ -58,6 +58,15 @@ typings/
5858
# Optional eslint cache
5959
.eslintcache
6060

61+
# Optional stylelint cache
62+
.stylelintcache
63+
64+
# Microbundle cache
65+
.rpt2_cache/
66+
.rts2_cache_cjs/
67+
.rts2_cache_es/
68+
.rts2_cache_umd/
69+
6170
# Optional REPL history
6271
.node_repl_history
6372

@@ -67,22 +76,37 @@ typings/
6776
# Yarn Integrity file
6877
.yarn-integrity
6978

70-
# dotenv environment variables file
79+
# dotenv environment variable files
7180
.env
72-
.env.test
81+
.env.development.local
82+
.env.test.local
83+
.env.production.local
84+
.env.local
7385

7486
# parcel-bundler cache (https://parceljs.org/)
7587
.cache
88+
.parcel-cache
7689

77-
# next.js build output
90+
# Next.js build output
7891
.next
92+
out
7993

80-
# nuxt.js build output
94+
# Nuxt.js build / generate output
8195
.nuxt
8296

97+
# Gatsby files
98+
.cache/
99+
# Comment in the public line in if your project uses Gatsby and not Next.js
100+
# https://nextjs.org/blog/next-9-1#public-directory-support
101+
# public
102+
83103
# vuepress build output
84104
.vuepress/dist
85105

106+
# vuepress v2.x temp and cache directory
107+
.temp
108+
.cache
109+
86110
# Serverless directories
87111
.serverless/
88112

@@ -91,4 +115,16 @@ typings/
91115

92116
# DynamoDB Local files
93117
.dynamodb/
94-
/.idea/
118+
119+
# TernJS port file
120+
.tern-port
121+
122+
# Stores VSCode versions used for testing VSCode extensions
123+
.vscode-test
124+
125+
# yarn v2
126+
.yarn/cache
127+
.yarn/unplugged
128+
.yarn/build-state.yml
129+
.yarn/install-state.gz
130+
.pnp.*

.husky/commit-msg

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
#!/bin/sh
2+
. "$(dirname "$0")/_/husky.sh"
3+
4+
npx commitlint -e $1

.husky/pre-commit

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
#!/bin/sh
2+
. "$(dirname "$0")/_/husky.sh"
3+
4+
npx lint-staged && npm run build && git add dist/*

.lintstagedrc.yml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
# we use tslint instead of ng lint, because we can't use --project (tsconfig specifying files with include, exclude )
2+
# and --files argument pointing to other files
3+
src/{**/,}!(*.+(spec|test)).ts:
4+
- npm run prettier:staged
5+
- npm run lint:staged
6+
# test folder and specs
7+
test/{**/,}*.ts,src/{**/,}*.+(spec|test).ts:
8+
- npm run prettier:staged
9+
- npm run lint:staged
10+
# e2e tests (mostly in client projects)
11+
e2e/{**/,}*.ts:
12+
- npm run prettier:staged
13+
- npm run lint:staged
14+
# sort package.json keys
15+
./package.json:
16+
- sort-package-json

.prettierrc.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# https://github.com/prettier/prettier/blob/master/docs/options.md
2+
printWidth: 120
3+
singleQuote: true
4+
semi: false
5+
trailingComma: all

README.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
# shiftcode/github-action-skip
22

3+
![version](https://img.shields.io/github/last-commit/shiftcode/github-action-skip)
4+
![version](https://img.shields.io/github/tag/shiftcode/github-action-skip?label=version)
5+
36
Github Actions have [native support](https://github.blog/changelog/2021-02-08-github-actions-skip-pull-request-and-push-workflows-with-skip-ci/) to skip an entire workflow depending on commit message. But since we rely on status checks
47
for our Pull Requests to be green, we need another option.
58

@@ -30,6 +33,13 @@ build:
3033
steps: ...
3134
```
3235
36+
## Development
37+
### new version
38+
1) implement your changes
39+
2) commit changes (pre-commit hook will do some code checks / changes and build the artifacts using ncc)
40+
3) set tag `git tag -a -m "my fancy release" v0.0.X`
41+
4) push with tags `git push --follow-tags`
42+
3343
## Publish to a distribution branch
3444

3545
Actions will be consumed from GitHub repos. All the dependencies must be pushed there. This means for JS also

action.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# check doc on https://docs.github.com/en/actions/creating-actions/metadata-syntax-for-github-actions#runs
22
name: 'Skip CI'
33
description: 'Sets output param depending on commit message'
4-
author: 'Michael Wittwer <michael.wittwer@shiftcode.ch>'
4+
author: 'shiftcode GmbH <team@shiftcode.ch>'
55
inputs:
66
skipOnCommitMsg:
77
description: 'defines an output variable depending if the commit message contains the skipOnCommitMsg string (output: true) or not (false).'
@@ -16,4 +16,4 @@ outputs:
1616
description: 'boolean value. True if the commit message contains the string provided in skipOnCommitMsg input param, false otherwise.'
1717
runs:
1818
using: 'node16'
19-
main: 'lib/main.js'
19+
main: 'dist/index.js'

0 commit comments

Comments
 (0)