Browse Source

chore: executable build corrections

Signed-off-by: Pranav C <pranavxc@gmail.com>
pull/2471/head
Pranav C 3 years ago
parent
commit
1d2b59ba73
  1. 54
      .github/workflows/release-executables.yml
  2. 1
      .github/workflows/release-timely-executables.yml
  3. BIN
      scripts/pkg-executable/binaries/binding/napi-v3-darwin-arm64/node_sqlite3.node
  4. BIN
      scripts/pkg-executable/binaries/binding/napi-v3-darwin-x64/node_sqlite3.node
  5. BIN
      scripts/pkg-executable/binaries/binding/napi-v3-linux-x64/node_sqlite3.node
  6. BIN
      scripts/pkg-executable/binaries/binding/napi-v3-win32-ia32/node_sqlite3.node
  7. BIN
      scripts/pkg-executable/binaries/binding/napi-v3-win32-x64/node_sqlite3.node
  8. 1
      scripts/pkg-executable/index.js
  9. 2
      scripts/pkg-executable/package.json

54
.github/workflows/release-executables.yml

@ -23,15 +23,12 @@ jobs:
steps:
# Get the latest draft release for asset upload url
- uses: cardinalby/git-get-release-action@v1
id: get_release
env:
GITHUB_TOKEN: ${{ secrets.NC_GITHUB_TOKEN }}
with:
latest: 1
draft: true
# Store upload url to access across jobs
- run: |
echo "::set-output name=UPLOAD_URL::${{ steps.get_release.outputs.upload_url }}"
id: get_release
env:
GITHUB_TOKEN: ${{ secrets.NC_GITHUB_TOKEN }}
with:
latest: 1
draft: true
- uses: actions/checkout@v3
- name: Cache node modules
id: cache-npm
@ -64,6 +61,7 @@ jobs:
# for building images for all platforms these libraries are required in Linux
- name: Install QEMU and ldid
run: |
sudo apt update
# Install qemu
sudo apt install qemu binfmt-support qemu-user-static
# install ldid
@ -95,6 +93,8 @@ jobs:
# build executables
npm run build
ls ./dist
# Move macOS executables for signing
mkdir ./mac-dist
mv ./dist/Noco-macos-arm64 ./mac-dist/
@ -107,23 +107,21 @@ jobs:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.get_release.outputs.upload_url }}
asset_path: ./scripts/pkg-executable/dist/Noco-win-arm64
asset_path: ./scripts/pkg-executable/dist/Noco-win-arm64.exe
asset_name: Noco-win-arm64
asset_content_type: application/octet-stream
- name: Upload win-x64 build to asset
id: upload-release-asset
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.get_release.outputs.upload_url }}
asset_path: ./scripts/pkg-executable/dist/Noco-win-x64
asset_path: ./scripts/pkg-executable/dist/Noco-win-x64.exe
asset_name: Noco-win-x64
asset_content_type: application/octet-stream
- name: Upload linux-arm64 build to asset
id: upload-release-asset
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
@ -134,7 +132,6 @@ jobs:
asset_content_type: application/octet-stream
- name: Upload linux-x64 build to asset
id: upload-release-asset
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
@ -149,7 +146,8 @@ jobs:
name: ${{ github.event.inputs.tag || inputs.tag }}
path: scripts/pkg-executable/mac-dist
retention-days: 1
outputs:
upload_url: ${{ steps.get_release.outputs.upload_url }}
sign-mac-executables:
runs-on: macos-latest
needs: build-executables
@ -173,7 +171,7 @@ jobs:
publish-mac-executables-and-homebrew:
needs: sign-mac-executables
needs: [sign-mac-executables,build-executables]
runs-on: ubuntu-latest
steps:
- uses: actions/download-artifact@master
@ -191,21 +189,21 @@ jobs:
fetch-depth: 0
- name: Compress files and calculate checksum
run: |
cp ./mac-dist/Noco-macos-x64 ./mac-dist/nocodb
tar -czf ./mac-dist/nocodb.tar.gz ./mac-dist/nocodb
rm ./mac-dist/nocodb
echo "::set-output name=CHECKSUM::$(shasum -a 256 ./mac-dist/nocodb.tar.gz | awk '{print $1}')"
id: compress
run: |
cd ./scripts/pkg-executable
cp ./mac-dist/Noco-macos-x64 ./mac-dist/nocodb
tar -czf ./mac-dist/nocodb.tar.gz ./mac-dist/nocodb
rm ./mac-dist/nocodb
echo "::set-output name=CHECKSUM::$(shasum -a 256 ./mac-dist/nocodb.tar.gz | awk '{print $1}')"
id: compress
- name: Upload macos-x64 build to asset
id: upload-release-asset
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.get_release.outputs.upload_url }}
upload_url: ${{ needs.build-executables.outputs.upload_url }}
asset_path: ./scripts/pkg-executable/mac-dist/Noco-macos-x64
asset_name: Noco-macos-x64
asset_content_type: application/octet-stream
@ -213,12 +211,11 @@ jobs:
- name: Upload macos-arm64 build to asset
id: upload-release-asset
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.get_release.outputs.upload_url }}
upload_url: ${{ needs.build-executables.outputs.upload_url }}
asset_path: ./scripts/pkg-executable/mac-dist/Noco-macos-arm64
asset_name: Noco-macos-arm64
asset_content_type: application/octet-stream
@ -226,14 +223,13 @@ jobs:
- name: Upload macos compressed build(for homebrew) to asset
id: upload-release-asset
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.get_release.outputs.upload_url }}
upload_url: ${{ needs.build-executables.outputs.upload_url }}
asset_path: ./scripts/pkg-executable/mac-dist/nocodb.tar.gz
asset_name: Noco-macos-arm64
asset_name: nocodb.tar.gz
asset_content_type: application/octet-stream

1
.github/workflows/release-timely-executables.yml

@ -53,6 +53,7 @@ jobs:
${{ runner.os }}-
- name: Install QEMU and ldid
run: |
sudo apt update
# Install qemu
sudo apt install qemu binfmt-support qemu-user-static
# install ldid

BIN
scripts/pkg-executable/binaries/binding/napi-v3-darwin-arm64/node_sqlite3.node

Binary file not shown.

BIN
scripts/pkg-executable/binaries/binding/napi-v3-darwin-x64/node_sqlite3.node

Binary file not shown.

BIN
scripts/pkg-executable/binaries/binding/napi-v3-linux-x64/node_sqlite3.node

Binary file not shown.

BIN
scripts/pkg-executable/binaries/binding/napi-v3-win32-ia32/node_sqlite3.node

Binary file not shown.

BIN
scripts/pkg-executable/binaries/binding/napi-v3-win32-x64/node_sqlite3.node

Binary file not shown.

1
scripts/pkg-executable/index.js

@ -1,3 +1,4 @@
process.env.NC_BINARY_BUILD = 'true';
(async () => {
try {
const app = require('express')();

2
scripts/pkg-executable/package.json

@ -28,6 +28,6 @@
"license": "ISC",
"dependencies": {
"express": "^4.17.1",
"nocodb-daily": "0.91.10"
"nocodb": "0.91.10"
}
}

Loading…
Cancel
Save