Skip to content

Commit b7eebd5

Browse files
author
Ahmad Nassri
committed
feat: initial commit
1 parent 065aeca commit b7eebd5

11 files changed

+5801
-2
lines changed

.editorconfig

+12
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
root = true
2+
3+
[*]
4+
charset = utf-8
5+
end_of_line = lf
6+
indent_size = 2
7+
indent_style = space
8+
insert_final_newline = true
9+
trim_trailing_whitespace = true
10+
11+
[*.md]
12+
trim_trailing_whitespace = false

.github/dependabot.yml

+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
version: 2
2+
updates:
3+
- package-ecosystem: "github-actions"
4+
open-pull-requests-limit: 10
5+
directory: "/"
6+
schedule:
7+
interval: "daily"
8+
9+
- package-ecosystem: "npm"
10+
open-pull-requests-limit: 10
11+
directory: "/"
12+
schedule:
13+
interval: "daily"
14+

.github/linters/.markdown-lint.yml

+154
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,154 @@
1+
# Heading levels should only increment by one level at a time
2+
MD001: false
3+
4+
# Heading style
5+
MD003:
6+
style: atx
7+
8+
# Unordered list style
9+
MD004:
10+
style: dash
11+
12+
# Inconsistent indentation for list items at the same level
13+
MD005: true
14+
15+
# Unordered list indentation
16+
MD007:
17+
indent: 2
18+
start_indented: false
19+
20+
# Trailing spaces
21+
MD009:
22+
br_spaces: 2
23+
list_item_empty_lines: false
24+
strict: false
25+
26+
# Hard tabs
27+
MD010:
28+
code_blocks: false
29+
30+
# Reversed link syntax
31+
MD011: true
32+
33+
# Multiple consecutive blank lines
34+
MD012:
35+
maximum: 1
36+
37+
# Line length
38+
MD013:
39+
line_length: 180
40+
strict: true
41+
stern: true
42+
43+
# Dollar signs used before commands without showing output
44+
MD014: false
45+
46+
# No space after hash on atx style heading
47+
MD018: true
48+
49+
# Multiple spaces after hash on atx style heading
50+
MD019: true
51+
52+
# No space inside hashes on closed atx style heading
53+
MD020: true
54+
55+
# Multiple spaces inside hashes on closed atx style heading
56+
MD021: true
57+
58+
# Headings should be surrounded by blank lines
59+
MD022:
60+
lines_above: 1
61+
lines_below: 1
62+
63+
64+
# Headings must start at the beginning of the line
65+
MD023: true
66+
67+
# Multiple headings with the same content
68+
MD024:
69+
allow_different_nesting: true
70+
71+
# Multiple top level headings in the same document
72+
MD025: true
73+
74+
# Trailing punctuation in heading
75+
MD026:
76+
punctuation: ".,;:!?。,;:!?"
77+
78+
# Multiple spaces after blockquote symbol
79+
MD027: true
80+
81+
# Blank line inside blockquote
82+
MD028: true
83+
84+
# Ordered list item prefix
85+
MD029:
86+
style: one_or_ordered
87+
88+
# Spaces after list markers
89+
MD030:
90+
ul_single: 1
91+
ol_single: 1
92+
ul_multi: 1
93+
ol_multi: 1
94+
95+
# Fenced code blocks should be surrounded by blank lines
96+
MD031:
97+
list_items: true
98+
99+
# Lists should be surrounded by blank lines
100+
MD032: true
101+
102+
# inline HTML
103+
MD033:
104+
allowed_elements: []
105+
106+
# Bare URL used
107+
MD034: true
108+
109+
# Horizontal rule style
110+
MD035:
111+
style: "---"
112+
113+
114+
# Emphasis used instead of a heading
115+
MD036:
116+
punctuation: ".,;:!?。,;:!?"
117+
118+
# Spaces inside emphasis markers
119+
MD037: true
120+
121+
# Spaces inside code span elements
122+
MD038: true
123+
124+
# Spaces inside link text
125+
MD039: true
126+
127+
# Fenced code blocks should have a language specified
128+
MD040: true
129+
130+
# First line in file should be a top level heading
131+
MD041: true
132+
133+
# No empty links
134+
MD042: true
135+
136+
# Required heading structure
137+
MD043: false
138+
139+
# Proper names should have the correct capitalization
140+
MD044: false
141+
142+
# Images should have alternate text (alt text)
143+
MD045: false
144+
145+
# Code block style
146+
MD046:
147+
style: fenced
148+
149+
# Files should end with a single newline character
150+
MD047: true
151+
152+
# Code fence style
153+
MD048:
154+
style: backtick

.github/workflows/release.yml

+33
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
name: release
2+
3+
on:
4+
push:
5+
branches:
6+
- master
7+
8+
jobs:
9+
dependencies:
10+
runs-on: ubuntu-latest
11+
12+
steps:
13+
- uses: actions/checkout@v2
14+
- uses: actions/[email protected]
15+
16+
# run checks
17+
- run: npm audit --audit-level=moderate
18+
- run: npx updated
19+
20+
release:
21+
needs: test
22+
23+
runs-on: ubuntu-latest
24+
25+
steps:
26+
- uses: actions/checkout@v2
27+
- uses: actions/[email protected]
28+
29+
# release
30+
- name: dogfood
31+
uses: .
32+
env:
33+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

.github/workflows/super-linter.yml

+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
name: super-linter
2+
3+
on:
4+
push:
5+
branches-ignore:
6+
- master
7+
8+
jobs:
9+
super-linter:
10+
runs-on: ubuntu-latest
11+
12+
steps:
13+
- uses: actions/checkout@v2
14+
- uses: docker://github/super-linter:v3

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
/node_modules

.releaserc

+31
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
{
2+
"plugins": [
3+
["@semantic-release/commit-analyzer", {
4+
"preset": "conventionalcommits",
5+
"releaseRules": [
6+
{ "breaking": true, "release": "major" },
7+
{ "revert": true, "release": "patch" },
8+
{ "type": "build", "release": "patch" },
9+
{ "type": "docs", "release": "patch" },
10+
{ "type": "feat", "release": "minor" },
11+
{ "type": "fix", "release": "patch" },
12+
{ "type": "perf", "release": "patch" },
13+
{ "type": "refactor", "release": "patch" }
14+
]
15+
}],
16+
["@semantic-release/release-notes-generator", {
17+
"preset": "conventionalcommits",
18+
"presetConfig": {
19+
"types": [
20+
{ "type": "build", "section": "Build", "hidden": false },
21+
{ "type": "docs", "section": "Docs", "hidden": false },
22+
{ "type": "feat", "section": "Features", "hidden": false },
23+
{ "type": "fix", "section": "Bug Fixes", "hidden": false },
24+
{ "type": "perf", "section": "Performance", "hidden": false },
25+
{ "type": "refactor", "section": "Refactor", "hidden": false }
26+
]
27+
}
28+
}],
29+
"@semantic-release/github"
30+
]
31+
}

README.md

-2
Original file line numberDiff line numberDiff line change
@@ -1,2 +0,0 @@
1-
# action-semantic-release
2-
Semantic Release with all the presets

index.js

+27
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
const core = require('@actions/core')
2+
const release = require('semantic-release')
3+
4+
release()
5+
.then(result => {
6+
// exit early
7+
if (!result) return core.setOutput('published', 'false')
8+
9+
// get result details
10+
const { lastRelease, nextRelease } = result
11+
12+
// outputs
13+
core.setOutput('last-release-git-head', lastRelease.gitHead)
14+
core.setOutput('last-release-version', lastRelease.version)
15+
core.setOutput('last-release-git-tag', lastRelease.gitTag)
16+
core.setOutput('last-release-channel', lastRelease.channel)
17+
18+
core.setOutput('published', 'true')
19+
core.setOutput('release-type', nextRelease.type)
20+
core.setOutput('release-git-head', nextRelease.gitHead)
21+
core.setOutput('release-version', nextRelease.version)
22+
core.setOutput('release-git-tag', nextRelease.gitTag)
23+
core.setOutput('release-notes', nextRelease.notes)
24+
core.setOutput('release-channel', nextRelease.channel)
25+
})
26+
// catch error
27+
.catch(core.setFailed)

0 commit comments

Comments
 (0)