Skip to content

Commit b82cfaf

Browse files
committed
Build NCC using actions
1 parent e102614 commit b82cfaf

3 files changed

Lines changed: 27 additions & 3 deletions

File tree

.github/workflows/ncc.yml

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
name: Flat
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
workflow_dispatch:
8+
9+
jobs:
10+
ncc:
11+
runs-on: ubuntu-latest
12+
steps:
13+
- name: Check out repo
14+
uses: actions/checkout@v2
15+
- name: npm run dist
16+
run: |-
17+
npm ci
18+
npm run dist
19+
- name: Commit and push if it changed
20+
run: |-
21+
git config user.name "Automated"
22+
git config user.email "actions@users.noreply.github.com"
23+
git add -A
24+
timestamp=$(date -u)
25+
git commit -m "Latest data: ${timestamp}" || exit 0
26+
git push

.gitignore

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
.github/workflows
2-
31
# Logs
42
logs
53
*.log

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
"main": "index.js",
66
"scripts": {
77
"build": "tsc",
8-
"package": "ncc build -e sqlite3 --source-map --license LICENSE --target es2020 lib/main.js",
8+
"package": "ncc build --source-map --license LICENSE --target es2020 lib/main.js",
99
"dist": "npm run build && npm run package",
1010
"format": "prettier --write **/*.ts"
1111
},

0 commit comments

Comments
 (0)