Skip to content

Commit 149dfdb

Browse files
committed
Initial commit
0 parents  commit 149dfdb

File tree

10 files changed

+2400
-0
lines changed

10 files changed

+2400
-0
lines changed

.github/workflows/publish.yml

Lines changed: 74 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,74 @@
1+
name: publish
2+
3+
env:
4+
NODE_VERSION: 18.x
5+
NPM_REGISTRY: 'https://registry.npmjs.org'
6+
7+
on:
8+
push:
9+
tags:
10+
- v*
11+
12+
jobs:
13+
pack:
14+
name: Pack (main)
15+
runs-on: ubuntu-latest
16+
permissions:
17+
contents: write
18+
steps:
19+
- name: Pack
20+
uses: neon-actions/[email protected]
21+
with:
22+
node-version: ${{ env.NODE_VERSION }}
23+
github-release: true
24+
25+
macos-builds:
26+
name: Builds (macOS)
27+
strategy:
28+
matrix:
29+
target: [aarch64-apple-darwin]
30+
runs-on: macos-arm64
31+
permissions:
32+
contents: write
33+
steps:
34+
- name: Build
35+
uses: neon-actions/[email protected]
36+
with:
37+
target: ${{ matrix.target }}
38+
node-version: ${{ env.NODE_VERSION }}
39+
npm-publish: false
40+
github-release: true
41+
42+
other-builds:
43+
name: Builds (other platforms)
44+
strategy:
45+
matrix:
46+
target: [x86_64-unknown-linux-gnu]
47+
runs-on: ubuntu-latest
48+
permissions:
49+
contents: write
50+
steps:
51+
- name: Build
52+
uses: neon-actions/[email protected]
53+
with:
54+
target: ${{ matrix.target }}
55+
node-version: ${{ env.NODE_VERSION }}
56+
use-cross: true
57+
npm-publish: false
58+
github-release: true
59+
60+
publish:
61+
name: Publish
62+
needs: [pack, macos-builds, other-builds]
63+
runs-on: ubuntu-latest
64+
permissions:
65+
contents: write
66+
steps:
67+
- name: Publish
68+
uses: neon-actions/[email protected]
69+
env:
70+
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
71+
with:
72+
node-version: ${{ env.NODE_VERSION }}
73+
registry-url: ${{ env.NPM_REGISTRY }}
74+
github-release: "*.tgz"

.gitignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
target
2+
**/*.node
3+
**/node_modules
4+
dist

.npmignore

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
.github
2+
Cargo.lock
3+
Cargo.toml
4+
release
5+
src

0 commit comments

Comments
 (0)