-
Notifications
You must be signed in to change notification settings - Fork 2
115 lines (85 loc) · 3.08 KB
/
Copy pathnode.js.yml
File metadata and controls
115 lines (85 loc) · 3.08 KB
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
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
name: Node.js CI
on:
push:
branches: [ "**" ]
pull_request:
branches: [ "**" ]
permissions:
# required for all workflows
security-events: write
# only required for workflows in private repositories
actions: read
contents: read
checks: write
# For publishing provenance to npm
id-token: write
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- name: Install and configure
uses: actions/setup-node@v6
with:
node-version: '24.16.0'
registry-url: 'https://registry.npmjs.org'
package-manager-cache: false # never use caching in release builds
- name: Install tools
run: |
npm i -g npm@11.13.0
npm i -g npm-check
- name: Check tool versions
run: |
node --version
npm --version
- name: Clean install dependencies
run: npm ci
- name: License header check
run: npm run license-check check
- name: Run ESLint
run: npm run eslint-junit || true # Always succeed, even with linting errors
- name: Report ESLint results
uses: dorny/test-reporter@v3
if: success() || failure()
with:
name: ESLint Results
path: "eslint-junit.xml"
reporter: java-junit
fail-on-error: false
- name: Run ESLint
run: npm run eslint-sarif || true # Always succeed, even with linting errors
- name: Upload EsLint scan results to GitHub Security tab
if: success() || failure()
uses: github/codeql-action/upload-sarif@v4
with:
sarif_file: 'eslint_report.sarif'
#- name: Archive lint reports
# if: ${{ success() }} || ${{ failure() }}
# uses: actions/upload-artifact@v4
# with:
# name: MegaLinter reports
# path: |
# megalinter-reports
# mega-linter.log
- name: Build
run: npm run build
# Don't link any more - we'll do that from the repo that uses this
# publish
- name: Publish
if: success() && github.ref == 'refs/heads/main'
env:
NODE_AUTH_TOKEN: ""
run: |
unset NODE_AUTH_TOKEN
npm publish --verbose --provenance --access public
- name: Send a stream message
if: (success() || failure()) && github.actor != 'dependabot[bot]'
uses: zulip/github-actions-zulip/send-message@v2
with:
api-key: ${{ secrets.ZULIP_API_KEY }}
email: "githubactionsbot-bot@maurodatamapper.zulipchat.com"
organization-url: "https://maurodatamapper.zulipchat.com"
to: "build/github-actions"
type: "stream"
topic: "${{github.repository}}"
content: "${{ job.status == 'success' && ':check_mark:' || ':cross_mark:' }} ${{github.repository}} : **${{github.ref}}**\nGitHub Actions build result: **${{ job.status }}**\n${{ github.event.pull_request.html_url || github.event.head_commit.url }}"