-
Notifications
You must be signed in to change notification settings - Fork 3
45 lines (45 loc) · 1.34 KB
/
main.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
name: Main
on: [push]
jobs:
build_publish:
runs-on: ubuntu-latest
if: github.ref == 'refs/heads/main'
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: '18'
cache: 'npm'
cache-dependency-path: '**/package-lock.json'
registry-url: 'https://registry.npmjs.org'
- name: Cache firebase emulators
uses: actions/cache@v4
with:
path: ~/.cache/firebase/emulators
key: ${{ runner.os }}-firebase-emulators-${{ hashFiles('~/.cache/firebase/emulators/**') }}
- run: npm i -g firebase-tools
- run: npm i
- run: npm run lint
- run: npm run tsc
- run: npm test
env:
PROJECT_ID: ${{ secrets.PROJECT_ID }}
- run: npm run build
- run: npm run link
- run: npm run b-tsc
- run: npm run b-test
env:
PROJECT_ID: ${{ secrets.PROJECT_ID }}
- uses: codecov/codecov-action@v4
- run: npm publish || true
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
- run: npm run p-i
- run: npm run p-tsc
- run: npm run p-test
env:
PROJECT_ID: ${{ secrets.PROJECT_ID }}
- run: npm run build-cjs
- run: npm publish --tag cjs || true
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}