Browse Source

chore: executable build corrections

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

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

@ -53,6 +53,7 @@ jobs:
${{ runner.os }}- ${{ runner.os }}-
- name: Install QEMU and ldid - name: Install QEMU and ldid
run: | run: |
sudo apt update
# Install qemu # Install qemu
sudo apt install qemu binfmt-support qemu-user-static sudo apt install qemu binfmt-support qemu-user-static
# install ldid # 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 () => { (async () => {
try { try {
const app = require('express')(); const app = require('express')();

2
scripts/pkg-executable/package.json

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

Loading…
Cancel
Save