Skip to content

Commit

Permalink
Removed prebuildify-ci and added first pass of publish action
Browse files Browse the repository at this point in the history
  • Loading branch information
josephg committed Jan 6, 2021
1 parent 89c2bd2 commit 3d3dc84
Show file tree
Hide file tree
Showing 3 changed files with 45 additions and 685 deletions.
44 changes: 35 additions & 9 deletions .github/workflows/buildmod.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
name: compile native module
name: deploy

on:
push
release:
types: [created]

jobs:
linux:
prebuild-linux:
runs-on: ubuntu-latest

steps:
Expand All @@ -27,8 +28,9 @@ jobs:
with:
name: linux-prebuild
path: prebuilds/
retention-days: 5

macos:
prebuild-macos:
runs-on: macos-latest

steps:
Expand All @@ -49,8 +51,9 @@ jobs:
with:
name: macos-prebuild
path: prebuilds/
retention-days: 5

windows:
prebuild-windows:
runs-on: windows-latest
env:
FOUNDATIONDB_INSTALL_PATH: "C:\\Program Files\\FoundationDB"
Expand All @@ -69,14 +72,14 @@ jobs:
- run: dir c:\foundationdb.msi
- run: msiexec /i c:\foundationdb.msi /quiet /passive /norestart /log install.log | Out-Null

- run: set FOUNDATIONDB_INSTALL_PATH="C:\Program Files\foundationdb"
# - run: set FOUNDATIONDB_INSTALL_PATH="C:\Program Files\foundationdb"
# - run: set PATH="C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\bin;%FOUNDATIONDB_INSTALL_PATH%bin;%PATH%"
- run: ($env:PATH).split(";")
# - run: ($env:PATH).split(";")
# - run: $OLDPATH = [System.Environment]::GetEnvironmentVariable('PATH','machine')
# - run: $NEWPATH = "$OLDPATH;C:\Program Files\foundationdb\bin"
# - run: [Environment]::SetEnvironmentVariable("PATH", "$NEWPATH", "Machine")
# - run: ($env:PATH).split(";")
- run: echo "$PATH"
# - run: echo "$PATH"
- run: echo "C:\\Program Files\\FoundationDB\bin" >> $GITHUB_PATH

- run: yarn
Expand All @@ -86,4 +89,27 @@ jobs:
uses: actions/upload-artifact@v2
with:
name: windows-prebuild
path: prebuilds/
path: prebuilds/
retention-days: 5

build:
needs: [prebuild-windows, prebuild-macos, prebuild-linux]
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
with:
node-version: 14
registry-url: 'https://registry.npmjs.org'

- uses: actions/download-artifact@v2
with:
path: prebuilds

- run: ls -R prebuilds

- run: yarn
- run: npm publish
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
3 changes: 1 addition & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
"install": "node-gyp-build",
"test": "mocha -r ts-node/register test/*.ts",
"prepare": "rm -rf dist && tsc -p .",
"prepublishOnly": "rm -rf prebuilds && prebuildify-ci download",
"prepublishOnly": "ls -ld prebuilds/win32-x64/node.napi.node prebuilds/linux-x64/node.napi.node prebuilds/darwin-x64/node.napi.node",
"prebuild": "prebuildify -t 12.1.0 --napi --strip"
},
"dependencies": {
Expand All @@ -41,7 +41,6 @@
"chalk": "^4.0.0",
"mocha": "^8.2.1",
"prebuildify": "^3.0.4",
"prebuildify-ci": "^1.0.5",
"ts-node": "^9.1.1",
"typescript": "^4.1.3",
"xml2js": "^0.4.23"
Expand Down
Loading

0 comments on commit 3d3dc84

Please sign in to comment.