-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: Initial GitHub workflow action for build NPM package
- Loading branch information
1 parent
d66ea6a
commit 0fb4256
Showing
9 changed files
with
144 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
name: | ||
on: | ||
workflow_call: | ||
env: | ||
SDK_JS_HOME: cohort_sdk_js | ||
jobs: | ||
npm: | ||
strategy: | ||
matrix: | ||
settings: | ||
- host: macos-latest | ||
target: darwin-arm64 | ||
buildCommand: | | ||
cd $SDK_JS_HOME && npm run build -- --target darwin-arm64 | ||
name: stable - ${{ matrix.settings.target }} - node@16 | ||
runs-on: ${{ matrix.settings.host }} | ||
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
- name: Setup node | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: 16 | ||
check-latest: true | ||
|
||
- name: Install | ||
uses: actions-rs/toolchain@v1 | ||
with: | ||
profile: minimal | ||
override: true | ||
toolchain: stable | ||
target: ${{ matrix.settings.target }} | ||
|
||
- name: List content before build | ||
shell: bash | ||
run: ls -l | ||
|
||
# - name: Cache cargo TODO deal with caching | ||
- name: Install node dependencies | ||
run: cd $SDK_JS_HOME && npm install | ||
|
||
- name: Cargo build | ||
run: cargo build | ||
|
||
- name: Build | ||
shell: bash | ||
run: ${{ matrix.settings.buildCommand }} | ||
|
||
- name: List content after build | ||
shell: bash | ||
run: ls -l |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
{ | ||
"name": "cohort_sdk_js-darwin-arm64", | ||
"version": "0.0.1", | ||
"os": [ | ||
"darwin" | ||
], | ||
"cpu": [ | ||
"arm64" | ||
], | ||
"main": "cohort_sdk_js.darwin-arm64.node", | ||
"files": [ | ||
"cohort_sdk_js.darwin-arm64.node" | ||
], | ||
"license": "MIT", | ||
"engines": { | ||
"node": ">= 10" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
{ | ||
"name": "cohort_sdk_js-darwin-universal", | ||
"version": "0.0.1", | ||
"os": [ | ||
"darwin" | ||
], | ||
"main": "cohort_sdk_js.darwin-universal.node", | ||
"files": [ | ||
"cohort_sdk_js.darwin-universal.node" | ||
], | ||
"license": "MIT", | ||
"engines": { | ||
"node": ">= 10" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
{ | ||
"name": "cohort_sdk_js-darwin-x64", | ||
"version": "0.0.1", | ||
"os": [ | ||
"darwin" | ||
], | ||
"cpu": [ | ||
"x64" | ||
], | ||
"main": "cohort_sdk_js.darwin-x64.node", | ||
"files": [ | ||
"cohort_sdk_js.darwin-x64.node" | ||
], | ||
"license": "MIT", | ||
"engines": { | ||
"node": ">= 10" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
{ | ||
"name": "cohort_sdk_js-linux-x64", | ||
"version": "0.0.1", | ||
"os": [ | ||
"linux" | ||
], | ||
"cpu": [ | ||
"x64" | ||
], | ||
"main": "cohort_sdk_js.linux-x64.node", | ||
"files": [ | ||
"cohort_sdk_js.linux-x64.node" | ||
], | ||
"license": "MIT", | ||
"engines": { | ||
"node": ">= 10" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
{ | ||
"name": "cohort_sdk_js-win32-x64-msvc", | ||
"version": "0.0.1", | ||
"os": [ | ||
"win32" | ||
], | ||
"cpu": [ | ||
"x64" | ||
], | ||
"main": "cohort_sdk_js.win32-x64-msvc.node", | ||
"files": [ | ||
"cohort_sdk_js.win32-x64-msvc.node" | ||
], | ||
"license": "MIT", | ||
"engines": { | ||
"node": ">= 10" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters