Skip to content

Commit

Permalink
Added prebuilt binaries via GitHub Releases
Browse files Browse the repository at this point in the history
- we're switching away from S3 for hosting binaries in favor of
  uploading to GitHub Releases straight from CI
- this should simplify a lot of things and make it easier to maintain
- this commit will upload the binaries generated by Node 16 as a draft
  Release to GitHub using `node-pre-gyp-github`, which I recently updated
- Node 16 should be able to produce v3 and v6 NAPI binaries, and this
  avoid the race to the finish with other Node versions that we've seen before
  • Loading branch information
daniellockyer committed Apr 13, 2022
1 parent b4b3c3a commit 7f744a1
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 4 deletions.
8 changes: 7 additions & 1 deletion .github/workflows/ci.yml
Expand Up @@ -63,10 +63,16 @@ jobs:
- name: Package prebuilt binaries
run: yarn node-pre-gyp package

- name: Upload build artifacts
- name: Upload build artifacts to commit artifacts
uses: actions/upload-artifact@v3
if: matrix.node == 16
with:
name: prebuilt-binaries
path: build/stage/sqlite3/*/*
retention-days: 7

- name: Upload binaries to GitHub Release
run: yarn node-pre-gyp-github publish
if: matrix.node == 16 && startsWith(github.ref, 'refs/tags/')
env:
NODE_PRE_GYP_GITHUB_TOKEN: ${{ github.token }}
7 changes: 4 additions & 3 deletions package.json
Expand Up @@ -10,8 +10,8 @@
"binary": {
"module_name": "node_sqlite3",
"module_path": "./lib/binding/napi-v{napi_build_version}-{platform}-{arch}",
"host": "https://mapbox-node-binary.s3.amazonaws.com",
"remote_path": "./{name}/v{version}/{toolset}/",
"host": "https://github.com/TryGhost/node-sqlite3/releases/download/",
"remote_path": "v{version}",
"package_name": "napi-v{napi_build_version}-{platform}-{arch}.tar.gz",
"napi_versions": [
3,
Expand Down Expand Up @@ -47,7 +47,8 @@
},
"devDependencies": {
"eslint": "6.8.0",
"mocha": "7.2.0"
"mocha": "7.2.0",
"node-pre-gyp-github": "1.4.4"
},
"peerDependencies": {
"node-gyp": "8.x"
Expand Down

0 comments on commit 7f744a1

Please sign in to comment.