Skip to content

Commit

Permalink
Fix workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
nzws committed Jan 8, 2022
1 parent 3087793 commit 8d8d4e6
Show file tree
Hide file tree
Showing 7 changed files with 15 additions and 5 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/native.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,8 @@ jobs:

- name: Install deps
run: yarn install --immutable --check-cache
env:
SKIP_BUILD: true

- run: echo "::set-output name=HASH::$(git submodule status externals/libemoji | awk '{print $1}')"
id: submodule_hash
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/node.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@ jobs:

- name: Install nodejs deps
run: yarn install --immutable --check-cache
env:
SKIP_BUILD: true

- run: yarn lint
- run: yarn build:ts
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/npm.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@ jobs:

- name: Install deps
run: yarn install --immutable --check-cache
env:
SKIP_BUILD: true

- run: echo "::set-output name=HASH::$(git submodule status externals/libemoji | awk '{print $1}')"
id: submodule_hash
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,6 @@ void (async () => {
asdf install python 2.7.18
sudo apt install clang-format # for linux
yarn
SKIP_BUILD=true yarn
yarn setup
```
4 changes: 1 addition & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@
"LICENSE"
],
"scripts": {
"install": "prebuild-install --runtime napi",
"install": "node ./scripts/skip-prebuild.js || prebuild-install --runtime napi",
"rebuild": "node-gyp rebuild",
"prebuild": "prebuild --runtime napi --all --strip --verbose",
"upload": "prebuild --runtime napi --upload ${GITHUB_TOKEN}",
Expand All @@ -77,8 +77,6 @@
"build": "npm-run-all 'build:*'",
"start": "ts-node example",
"clean": "node-gyp clean",
"prepublishOnly": "yarn build && echo '!lib' >> externals/libemoji/.gitignore",
"postpublish": "sed -i -e '/!lib/d' externals/libemoji/.gitignore",
"test:ts": "jest ./__tests__/lib/**/*.ts",
"test:cpp": "jest ./__tests__/src/**/*.ts",
"test": "npm-run-all -p 'test:*'"
Expand Down
5 changes: 5 additions & 0 deletions scripts/skip-prebuild.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
if (process.env.SKIP_BUILD) {
process.exit(0);
} else {
process.exit(1);
}
3 changes: 2 additions & 1 deletion tsconfig.etc.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
{
"extends": "./tsconfig.json",
"compilerOptions": {
"noEmit": true
"noEmit": true,
"allowJs": true
},
"include": ["**/*.ts"],
"exclude": ["lib", "node_modules"]
Expand Down

0 comments on commit 8d8d4e6

Please sign in to comment.