Skip to content

Commit 474abbe

Browse files
committed
replace previous workflows with new workflows
Signed-off-by: Utkarsh Srivastava <srivastavautkarsh8097@gmail.com>
1 parent abd9cef commit 474abbe

File tree

4 files changed

+41
-86
lines changed

4 files changed

+41
-86
lines changed

.github/workflows/artifacts.yml

Lines changed: 0 additions & 39 deletions
This file was deleted.

.github/workflows/npm.yml

Lines changed: 0 additions & 30 deletions
This file was deleted.

.github/workflows/release.yml

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
name: Releases
2+
3+
on:
4+
push:
5+
tags:
6+
- 'v*.*.*'
7+
8+
jobs:
9+
release:
10+
runs-on: ubuntu-latest
11+
steps:
12+
- uses: actions/checkout@v2
13+
- name: Setup NodeJS
14+
uses: actions/setup-node@v2
15+
- name: Setup Wasm Pack
16+
uses: jetli/wasm-pack-action@v0.3.0
17+
- name: Build the WASM artifact
18+
env:
19+
GIT_TAG: ${{ github.ref_name }}
20+
run: |
21+
wasm-pack build --target node
22+
mv pkg/nodejs_snowflake_bg.wasm pkg/nodejs_snowflake_${GIT_TAG}.wasm
23+
- name: Create Release
24+
uses: ncipollo/release-action@v1
25+
env:
26+
GIT_TAG: ${{ github.ref_name }}
27+
with:
28+
generateReleaseNotes: true
29+
artifacts: "pkg/nodejs_snowflake_${GIT_TAG}.wasm"
30+
token: ${{ secrets.GITHUB_TOKEN }}
31+
- name: Publish packages to NPM
32+
env:
33+
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
34+
run: wasm-pack publish

.github/workflows/tests.yml

Lines changed: 7 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -9,23 +9,13 @@ on:
99
- master
1010

1111
jobs:
12-
build:
13-
strategy:
14-
matrix:
15-
os: [ubuntu-latest]
16-
node-version: [12.17.0, 14.16.0]
17-
runs-on: ${{ matrix.os }}
12+
test:
13+
runs-on: ubuntu-latest
1814
steps:
1915
- uses: actions/checkout@v2
20-
- name: Use Node.js ${{ matrix.node-version }}
21-
uses: actions/setup-node@v1
22-
with:
23-
node-version: ${{ matrix.node-version }}
24-
- name: Install Dependencies
25-
run: npm ci
26-
27-
- name: Build NodeJS Snowflake
28-
run: npm run build
29-
16+
- name: Setup NodeJS
17+
uses: actions/setup-node@v2
18+
- name: Setup Wasm Pack
19+
uses: jetli/wasm-pack-action@v0.3.0
3020
- name: Run Tests
31-
run: npm t
21+
run: wasm-pack test --node

0 commit comments

Comments
 (0)