-
Notifications
You must be signed in to change notification settings - Fork 0
45 lines (45 loc) · 1.3 KB
/
lint.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
# This workflow will do a clean installation of node dependencies, cache/restore them, build the source code and run tests across different versions of node
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-nodejs
name: Node.js lint
on:
push:
branches: ['main']
pull_request:
branches: ['main']
permissions:
id-token: write
attestations: write
jobs:
lint_typecheck:
runs-on: ubuntu-latest
permissions:
id-token: write
attestations: write
steps:
- uses: actions/checkout@v3
- name: Setup nodejs
uses: actions/setup-node@v4
with:
node-version: lts/*
- name: Cache node_modules
id: node-modules
uses: actions/cache@v4
with:
path: |
node_modules
example/node_modules
.yarn/cache
key: node-modules
- run: yarn
- run: yarn lint
- run: yarn typecheck
- run: yarn pack --out '%s_%v.tgz'
- name: Upload Artifact
uses: actions/upload-artifact@v4
with:
name: package
path: '${{ github.workspace }}/*.tgz'
- name: Attest
uses: actions/attest-build-provenance@v1
with:
subject-path: '${{ github.workspace }}/*.tgz'