-
Notifications
You must be signed in to change notification settings - Fork 8
39 lines (38 loc) · 969 Bytes
/
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
on: push
jobs:
lint:
name: Lint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
- uses: actions/setup-node@v3
with:
node-version: "16"
- run: npm i --save-dev
- name: eslint
run: |
npm run lint
- name: tsc
run: |
npx tsc
build:
name: Build package
runs-on: ubuntu-latest
needs: lint
steps:
- uses: actions/checkout@master
- run: echo "REPOSITORY_NAME=${GITHUB_REPOSITORY#${GITHUB_REPOSITORY_OWNER}/}" >> $GITHUB_ENV
- name: Make archive
run: |
DATE=$(date "+%Y%d%m-%H-%M")
NAME="${REPOSITORY_NAME}_${DATE}"
echo "FILE_NAME=${NAME}" >> $GITHUB_ENV
- uses: actions/upload-artifact@v3
with:
name: ${{env.FILE_NAME}}
path: |
./
!*git*
!node_modules/*
!package-lock.json
if-no-files-found: error