forked from visjs/vis-timeline
-
Notifications
You must be signed in to change notification settings - Fork 0
94 lines (77 loc) · 2.17 KB
/
config.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
name: CI/CD
on:
push:
branches: [master]
pull_request:
branches: [master]
env:
GIT_AUTHOR_EMAIL: [email protected]
GIT_AUTHOR_NAME: smartsquare-bot
GIT_COMMITTER_EMAIL: [email protected]
GIT_COMMITTER_NAME: smartsquare-bot
jobs:
build-and-test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: "21.7.3"
cache: "npm"
- name: Install dependencies
run: npm ci
- name: Build
run: npm run build
# Not needed for now
# - name: Generate examples index
# run: npm run generate-examples-index
# Uncomment when code base is ready
# - name: Lint
# run: npm run lint
- name: Test
run: npm run test-cov
- name: Upload artifacts
uses: actions/upload-artifact@v4
with:
name: build-artifacts
path: |
declarations/
dist/
esnext/
peer/
standalone/
styles/
types/
examples/
coverage/
docs/
LICENSE*
*.html
*.md
release:
needs: build-and-test
if: github.ref == 'refs/heads/master'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Download artifacts
uses: actions/download-artifact@v4
with:
name: build-artifacts
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: "21.7.3"
registry-url: "https://registry.npmjs.org"
- name: Release
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_CONFIG_REGISTRY: "https://registry.npmjs.org"
run: npx semantic-release
permissions:
contents: write # to be able to publish a GitHub release
issues: write # to be able to comment on released issues
pull-requests: write # to be able to comment on released pull requests
id-token: write # to enable use of OIDC for npm provenance