Skip to content

Commit 4f6d8a3

Browse files
committed
ci: single flow
1 parent ea80dc9 commit 4f6d8a3

File tree

7 files changed

+57
-89
lines changed

7 files changed

+57
-89
lines changed

.github/codeowners

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
* @vladkens

.github/workflows/ci.yml

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
name: ci
2+
3+
on:
4+
push:
5+
pull_request:
6+
7+
jobs:
8+
test:
9+
runs-on: ubuntu-latest
10+
name: node-${{ matrix.node-version }}
11+
strategy:
12+
matrix:
13+
node-version: [18, 20, 22]
14+
steps:
15+
- uses: actions/checkout@v4
16+
- uses: actions/setup-node@v4
17+
with:
18+
node-version: ${{ matrix.node-version }}
19+
cache: "yarn"
20+
21+
- run: yarn install --frozen-lockfile
22+
- run: yarn ci
23+
24+
release:
25+
runs-on: ubuntu-latest
26+
if: ${{ startsWith(github.ref, 'refs/tags/v') }}
27+
needs: test
28+
permissions:
29+
contents: write
30+
steps:
31+
- uses: actions/checkout@v4
32+
- uses: actions/setup-node@v4
33+
with:
34+
node-version: "22"
35+
registry-url: "https://registry.npmjs.org"
36+
37+
- run: yarn install --frozen-lockfile
38+
- run: yarn ci
39+
40+
- run: npm publish
41+
env:
42+
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
43+
44+
- name: Create Github Release
45+
uses: softprops/action-gh-release@v2
46+
env:
47+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

.github/workflows/publish.yml

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

.github/workflows/test.yml

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

.gitignore

Lines changed: 3 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -1,38 +1,3 @@
1-
lib-cov
2-
*.seed
3-
*.log
4-
*.csv
5-
*.dat
6-
*.out
7-
*.pid
8-
*.gz
9-
*.swp
10-
11-
pids
12-
logs
13-
results
14-
tmp
15-
16-
# Build
17-
public/css/main.css
18-
19-
# Coverage reports
20-
coverage
21-
22-
# API keys and secrets
23-
.env
24-
25-
# Dependency directory
26-
node_modules
27-
bower_components
28-
29-
# Editors
30-
.idea
31-
*.iml
32-
33-
# OS metadata
34-
.DS_Store
35-
Thumbs.db
36-
37-
# Ignore built ts files
38-
dist/**/*
1+
node_modules/
2+
coverage/
3+
dist/

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,8 @@
99
"test-cov": "c8 --include=src yarn test",
1010
"test-watch": "watchexec -e ts 'clear && yarn test'",
1111
"format": "prettier --write .",
12-
"ci": "yarn test-cov && yarn build"
12+
"lint": "tsc --noEmit && prettier --check .",
13+
"ci": "yarn lint && yarn test-cov && yarn build"
1314
},
1415
"dependencies": {},
1516
"devDependencies": {

readme.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,10 @@ A set of functions for working with arrays, often necessary for working with sta
1414

1515
## Install
1616

17+
```sh
18+
npm i array-utils-ts
19+
```
20+
1721
```sh
1822
yarn add array-utils-ts
1923
```

0 commit comments

Comments
 (0)