File tree Expand file tree Collapse file tree 3 files changed +76
-0
lines changed Expand file tree Collapse file tree 3 files changed +76
-0
lines changed Original file line number Diff line number Diff line change
1
+ name : Release
2
+
3
+ on :
4
+ push :
5
+ tags :
6
+ - ' v*'
7
+
8
+ jobs :
9
+ release :
10
+ runs-on : ubuntu-latest
11
+ permissions :
12
+ contents : read
13
+ id-token : write
14
+
15
+ steps :
16
+ - name : Checkout code
17
+ uses : actions/checkout@v4
18
+
19
+ - name : Setup Node.js
20
+ uses : actions/setup-node@v4
21
+ with :
22
+ node-version : 20
23
+ cache : ' npm'
24
+
25
+ - name : Install dependencies
26
+ run : npm ci
27
+
28
+ - name : Run linter
29
+ run : npm run lint
30
+
31
+ - name : Run tests
32
+ run : npm test
33
+
34
+ - name : Create .npmrc file
35
+ run : |
36
+ cat > .npmrc << EOF
37
+ //registry.npmjs.org/:_authToken=${{ secrets.NPM_TOKEN }}
38
+ EOF
39
+ echo "Created .npmrc file"
40
+
41
+ - name : Publish to npm
42
+ run : npm publish --access public --provenance
Original file line number Diff line number Diff line change
1
+ name : Tests
2
+
3
+ on : [push, pull_request]
4
+
5
+ jobs :
6
+ test :
7
+ runs-on : ubuntu-latest
8
+
9
+ strategy :
10
+ matrix :
11
+ node-version : [20, 22]
12
+
13
+ steps :
14
+ - name : Checkout code
15
+ uses : actions/checkout@v4
16
+
17
+ - name : Setup Node.js ${{ matrix.node-version }}
18
+ uses : actions/setup-node@v4
19
+ with :
20
+ node-version : ${{ matrix.node-version }}
21
+ cache : ' npm'
22
+
23
+ - name : Install dependencies
24
+ run : npm ci
25
+
26
+ - name : Run linter
27
+ run : npm run lint
28
+
29
+ - name : Run tests
30
+ run : npm test
Original file line number Diff line number Diff line change 4
4
"description" : " Nette-specific ESLint rules and config" ,
5
5
"type" : " module" ,
6
6
"license" : " MIT" ,
7
+ "repository" : {
8
+ "type" : " git" ,
9
+ "url" : " https://github.com/nette/eslint-plugin"
10
+ },
7
11
"main" : " src/index.js" ,
8
12
"files" : [
9
13
" src"
You can’t perform that action at this time.
0 commit comments