From 8bd49acc8988d3e31efd70f7e43dc71851ae17f0 Mon Sep 17 00:00:00 2001 From: Pranav C Date: Mon, 20 Jun 2022 11:22:44 +0530 Subject: [PATCH 01/18] chore: action for executable build Signed-off-by: Pranav C --- .github/workflows/release-executables.yml | 169 ++++++++++++++++++++++ 1 file changed, 169 insertions(+) create mode 100644 .github/workflows/release-executables.yml diff --git a/.github/workflows/release-executables.yml b/.github/workflows/release-executables.yml new file mode 100644 index 0000000000..9beee261bd --- /dev/null +++ b/.github/workflows/release-executables.yml @@ -0,0 +1,169 @@ +name: "Release : Executables" + +on: + # Triggered manually + workflow_dispatch: + inputs: + tag: + description: "Timely version" + required: true # Triggered by release-nocodb.yml / release-nightly-dev.yml / release-pr.yml + workflow_call: + inputs: + tag: + description: "Timely version" + required: true + type: string +jobs: + build-executables: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + with: + token: ${{ secrets.NC_GITHUB_TOKEN }} + repository: 'nocodb/nocodb-timely' + - name: Cache node modules + id: cache-npm + uses: actions/cache@v3 + env: + cache-name: cache-node-modules + with: + # npm cache files are stored in `~/.npm` on Linux/macOS + path: ~/.npm + key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }} + restore-keys: | + ${{ runner.os }}-build-${{ env.cache-name }}- + ${{ runner.os }}-build- + ${{ runner.os }}- + - name: Cache pkg modules + id: cache-pkg + uses: actions/cache@v3 + env: + cache-name: cache-pkg + with: + # pkg cache files are stored in `~/.pkg-cache` + path: ~/.pkg-cache + key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }} + restore-keys: | + ${{ runner.os }}-build-${{ env.cache-name }}- + ${{ runner.os }}-build- + ${{ runner.os }}- + - name: Install QEMU and ldid + run: | + # Install qemu + sudo apt install qemu binfmt-support qemu-user-static + # install ldid + git clone https://github.com/daeken/ldid.git + cd ./ldid + ./make.sh + sudo cp ./ldid /usr/local/bin + + - name: Update nocodb-timely + env: + TAG: ${{ github.event.inputs.tag || inputs.tag }} + run: | + npm i -E nocodb-daily@$TAG + + git config --global user.name "Pranav C" + git config --global user.email "pranavxc@gmail.com" + + git commit package.json -m "Update to $TAG" + git tag $TAG + git push --tags + + + - uses: actions/setup-node@v3 + with: + node-version: 16 + + - name : Install dependencies and build executables + run: | + npm i + + # npm i --target_arch=x64 --target_platform=darwin + + # npx node-pre-gyp install --directory=./node_modules/sqlite3 --target_platform=win32 --target_arch=ia32 + # npx node-pre-gyp install --directory=./node_modules/sqlite3 --target_platform=darwin --target_arch=x64 + # npx node-pre-gyp install --directory=./node_modules/sqlite3 --target_platform=darwin --target_arch=arm + # npx node-pre-gyp install --directory=./node_modules/sqlite3 --target_platform=linux --target_arch=x64 + # npx node-pre-gyp install --directory=./node_modules/sqlite3 --target_platform=linux --target_arch=arm + + # Copy sqlite binaries + rsync -rvzhP ./binaries/binding/ ./node_modules/sqlite3/lib/binding/ + + # clean up code to optimize size + npx modclean --patterns="default:*" --ignore="nc-lib-gui/**,dayjs/**,express-status-monitor/**,sqlite3/**" --run + + + # build executables + npm run build + + mkdir ./mac-dist + mv ./dist/Noco-macos-arm64 ./mac-dist/ + mv ./dist/Noco-macos-x64 ./mac-dist/ + + GZIP=-9 tar -czvf ./dist/Noco-linux-x64.tar.gz ./dist/Noco-linux-x64 + GZIP=-9 tar -czvf ./dist/Noco-win-x64.tar.gz ./dist/Noco-win-x64.exe + GZIP=-9 tar -czvf ./dist/Noco-linux-arm64.tar.gz ./dist/Noco-linux-arm64 + GZIP=-9 tar -czvf ./dist/Noco-win-arm64.tar.gz ./dist/Noco-win-arm64.exe + + - name: Upload executables(except mac executables) to release + uses: svenstaro/upload-release-action@v2 + with: + repo_token: ${{ secrets.NC_GITHUB_TOKEN }} + file: dist/** + tag: ${{ github.event.inputs.tag || inputs.tag }} + overwrite: true + file_glob: true + repo_name: nocodb/nocodb-timely + + - uses: actions/upload-artifact@master + with: + name: executables + path: mac-dist + retention-days: 1 + + sign-mac-executables: + runs-on: macos-latest + needs: build-executables + steps: + + - uses: actions/download-artifact@master + with: + name: executables + path: mac-dist + + - run: | + /usr/bin/codesign --force -s - ./mac-dist/Noco-macos-arm64 -v + /usr/bin/codesign --force -s - ./mac-dist/Noco-macos-x64 -v + + - uses: actions/upload-artifact@master + with: + name: executables + path: mac-dist + retention-days: 1 + + + publish: + needs: sign-mac-executables + runs-on: ubuntu-latest + steps: + - uses: actions/download-artifact@master + with: + name: executables + path: mac-dist + - name: Compress files + run: | + GZIP=-9 tar -czvf ./mac-dist/Noco-macos-x64.tar.gz ./mac-dist/Noco-macos-x64 + GZIP=-9 tar -czvf ./mac-dist/Noco-macos-arm64.tar.gz ./mac-dist/Noco-macos-arm64 + + - name: Upload mac executables to release + uses: svenstaro/upload-release-action@v2 + with: + repo_token: ${{ secrets.NC_GITHUB_TOKEN }} + file: mac-dist/** + tag: ${{ github.event.inputs.tag || inputs.tag }} + overwrite: true + file_glob: true + repo_name: nocodb/nocodb-timely + + From f8e08605a52edb2fc650d4c16a34acd4808949cc Mon Sep 17 00:00:00 2001 From: Pranav C Date: Mon, 20 Jun 2022 11:41:00 +0530 Subject: [PATCH 02/18] chore: integrate with nightly-dev and pr release actions Signed-off-by: Pranav C --- .github/workflows/release-nightly-dev.yml | 9 ++++++++- .github/workflows/release-pr.yml | 24 ++++++++++++++++++++--- 2 files changed, 29 insertions(+), 4 deletions(-) diff --git a/.github/workflows/release-nightly-dev.yml b/.github/workflows/release-nightly-dev.yml index af71aa58ff..c05a477da1 100644 --- a/.github/workflows/release-nightly-dev.yml +++ b/.github/workflows/release-nightly-dev.yml @@ -37,7 +37,7 @@ jobs: outputs: nightly_build_tag: ${{ steps.tag-step.outputs.NIGHTLY_BUILD_TAG }} is_daily: ${{ steps.tag-step.outputs.IS_DAILY }} - current_version: ${{ steps.tag-step.outputs.CURRENT_VERSION }} + current_version: ${{ steps.tag-step.outputs.CURRENT_VERSION }} # Build frontend and backend and publish to npm release-npm: needs: set-tag @@ -48,6 +48,13 @@ jobs: secrets: NPM_TOKEN: "${{ secrets.NPM_TOKEN }}" + # Build executables and publish to GitHub + release-executables: + needs: [set-tag, release-npm] + uses: ./.github/workflows/release-executables.yml + with: + tag: ${{ needs.set-tag.outputs.nightly_build_tag }} + # Build docker image and push to docker hub release-docker: needs: [set-tag, release-npm] diff --git a/.github/workflows/release-pr.yml b/.github/workflows/release-pr.yml index 38cce2c390..394bd8b1ab 100644 --- a/.github/workflows/release-pr.yml +++ b/.github/workflows/release-pr.yml @@ -50,7 +50,7 @@ jobs: echo ${{ steps.tag-step.outputs.CURRENT_VERSION }} outputs: target_tag: ${{ steps.tag-step.outputs.TARGET_TAG }} - current_version: ${{ steps.tag-step.outputs.CURRENT_VERSION }} + current_version: ${{ steps.tag-step.outputs.CURRENT_VERSION }} # Build, install, publish frontend and backend to npm release-npm: @@ -77,13 +77,21 @@ jobs: DOCKERHUB_USERNAME: "${{ secrets.DOCKERHUB_USERNAME }}" DOCKERHUB_TOKEN: "${{ secrets.DOCKERHUB_TOKEN }}" + # Build executables and publish to GitHub + release-executables: + needs: [set-tag, release-npm] + uses: ./.github/workflows/release-executables.yml + with: + tag: ${{ needs.set-tag.outputs.target_tag }} + current-version: ${{ needs.set-tag.outputs.current_version }} + # leave-comment: # runs-on: 'ubuntu-latest' # needs: [release-docker, set-tag] # steps: # - run: | # echo docker run -d -p 8888:8080 nocodb/nocodb-timely:${{ needs.set-tag.outputs.current_version }}-${{ needs.set-tag.outputs.target_tag }} - + leave-comment: if: ${{ github.actor != 'dependabot[bot]' && github.event.pull_request.draft == false }} runs-on: 'ubuntu-latest' @@ -96,7 +104,17 @@ jobs: ``` docker run -d -p 8888:8080 nocodb/nocodb-timely:${{ needs.set-tag.outputs.current_version }}-${{ needs.set-tag.outputs.target_tag }} ``` - + + leave-executable-comment: + if: ${{ github.actor != 'dependabot[bot]' && github.event.pull_request.draft == false }} + runs-on: 'ubuntu-latest' + needs: [release-executables] + steps: + - uses: peter-evans/commit-comment@v2 + with: + body: | + The PR changes have been deployed as executables. Pleae visit following link to download executables : https://github.com/nocodb/nocodb-timely/releases/tag/${{ needs.set-tag.outputs.target_tag }} + # if-merged: # if: github.event.pull_request.merged == true # runs-on: ubuntu-latest From 4d9acd3f7e02d785c1cba15005f46df089b6bf30 Mon Sep 17 00:00:00 2001 From: Pranav C Date: Mon, 20 Jun 2022 11:45:33 +0530 Subject: [PATCH 03/18] chore: test commit Signed-off-by: Pranav C --- packages/nocodb/README.md | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/packages/nocodb/README.md b/packages/nocodb/README.md index 8f5aafdd84..b348b6d25c 100644 --- a/packages/nocodb/README.md +++ b/packages/nocodb/README.md @@ -1,10 +1,11 @@ -# nocodb +# Nocodb ## Running locally Even though this package is a backend project, you can still visit the dashboard as it includes ``nc-lib-gui``. ``` + npm install npm run watch:run # open localhost:8080/dashboard in browser @@ -18,4 +19,4 @@ If you wish to combine the frontend and backend together in your local devlopmen "nc-lib-gui": "file:../nc-lib-gui" ``` -In this case, whenever there is any changes made in frontend, you need to run ``npm run build:copy`` under ``packages/nc-gui/``. \ No newline at end of file +In this case, whenever there is any changes made in frontend, you need to run ``npm run build:copy`` under ``packages/nc-gui/``. From 0361d2e1e772f7a4ef36e0b37f7f62c6122579ca Mon Sep 17 00:00:00 2001 From: Pranav C Date: Mon, 20 Jun 2022 11:48:09 +0530 Subject: [PATCH 04/18] chore: remove invalid input Signed-off-by: Pranav C --- .github/workflows/release-pr.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/release-pr.yml b/.github/workflows/release-pr.yml index 394bd8b1ab..92aff58783 100644 --- a/.github/workflows/release-pr.yml +++ b/.github/workflows/release-pr.yml @@ -83,7 +83,6 @@ jobs: uses: ./.github/workflows/release-executables.yml with: tag: ${{ needs.set-tag.outputs.target_tag }} - current-version: ${{ needs.set-tag.outputs.current_version }} # leave-comment: # runs-on: 'ubuntu-latest' From 27ae673691d6a70c9e399406f92d5e43d4cf0277 Mon Sep 17 00:00:00 2001 From: Pranav C Date: Mon, 20 Jun 2022 11:53:06 +0530 Subject: [PATCH 05/18] chore: tag name correction Signed-off-by: Pranav C --- .github/workflows/release-nightly-dev.yml | 2 +- .github/workflows/release-pr.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/release-nightly-dev.yml b/.github/workflows/release-nightly-dev.yml index c05a477da1..7f4d7522d1 100644 --- a/.github/workflows/release-nightly-dev.yml +++ b/.github/workflows/release-nightly-dev.yml @@ -53,7 +53,7 @@ jobs: needs: [set-tag, release-npm] uses: ./.github/workflows/release-executables.yml with: - tag: ${{ needs.set-tag.outputs.nightly_build_tag }} + tag: ${{ needs.set-tag.outputs.current_version }}-${{ needs.set-tag.outputs.nightly_build_tag }} # Build docker image and push to docker hub release-docker: diff --git a/.github/workflows/release-pr.yml b/.github/workflows/release-pr.yml index 92aff58783..b698f3ccc4 100644 --- a/.github/workflows/release-pr.yml +++ b/.github/workflows/release-pr.yml @@ -82,7 +82,7 @@ jobs: needs: [set-tag, release-npm] uses: ./.github/workflows/release-executables.yml with: - tag: ${{ needs.set-tag.outputs.target_tag }} + tag: ${{ needs.set-tag.outputs.current_version }}-${{ needs.set-tag.outputs.target_tag }} # leave-comment: # runs-on: 'ubuntu-latest' From 51b00653b900f974a0fdbe37b4507ba592f596c8 Mon Sep 17 00:00:00 2001 From: Pranav C Date: Mon, 20 Jun 2022 12:06:19 +0530 Subject: [PATCH 06/18] chore: secret name correction Signed-off-by: Pranav C --- .github/workflows/release-executables.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/release-executables.yml b/.github/workflows/release-executables.yml index 9beee261bd..0867ce8efc 100644 --- a/.github/workflows/release-executables.yml +++ b/.github/workflows/release-executables.yml @@ -19,7 +19,7 @@ jobs: steps: - uses: actions/checkout@v3 with: - token: ${{ secrets.NC_GITHUB_TOKEN }} + token: ${{ secrets.GITHUB_TOKEN }} repository: 'nocodb/nocodb-timely' - name: Cache node modules id: cache-npm @@ -109,7 +109,7 @@ jobs: - name: Upload executables(except mac executables) to release uses: svenstaro/upload-release-action@v2 with: - repo_token: ${{ secrets.NC_GITHUB_TOKEN }} + repo_token: ${{ secrets.GITHUB_TOKEN }} file: dist/** tag: ${{ github.event.inputs.tag || inputs.tag }} overwrite: true @@ -159,7 +159,7 @@ jobs: - name: Upload mac executables to release uses: svenstaro/upload-release-action@v2 with: - repo_token: ${{ secrets.NC_GITHUB_TOKEN }} + repo_token: ${{ secrets.GITHUB_TOKEN }} file: mac-dist/** tag: ${{ github.event.inputs.tag || inputs.tag }} overwrite: true From 270903e7a6cd6db5677e9a196483b160985dcf80 Mon Sep 17 00:00:00 2001 From: Pranav C Date: Mon, 20 Jun 2022 12:11:40 +0530 Subject: [PATCH 07/18] fix: pass secrets to reusable workflow Signed-off-by: Pranav C --- .github/workflows/release-executables.yml | 9 ++++++--- .github/workflows/release-nightly-dev.yml | 2 ++ .github/workflows/release-pr.yml | 2 ++ 3 files changed, 10 insertions(+), 3 deletions(-) diff --git a/.github/workflows/release-executables.yml b/.github/workflows/release-executables.yml index 0867ce8efc..2d5fdd29e3 100644 --- a/.github/workflows/release-executables.yml +++ b/.github/workflows/release-executables.yml @@ -13,13 +13,16 @@ on: description: "Timely version" required: true type: string + secrets: + NC_GITHUB_TOKEN: + required: true jobs: build-executables: runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 with: - token: ${{ secrets.GITHUB_TOKEN }} + token: ${{ secrets.NC_GITHUB_TOKEN }} repository: 'nocodb/nocodb-timely' - name: Cache node modules id: cache-npm @@ -109,7 +112,7 @@ jobs: - name: Upload executables(except mac executables) to release uses: svenstaro/upload-release-action@v2 with: - repo_token: ${{ secrets.GITHUB_TOKEN }} + repo_token: ${{ secrets.NC_GITHUB_TOKEN }} file: dist/** tag: ${{ github.event.inputs.tag || inputs.tag }} overwrite: true @@ -159,7 +162,7 @@ jobs: - name: Upload mac executables to release uses: svenstaro/upload-release-action@v2 with: - repo_token: ${{ secrets.GITHUB_TOKEN }} + repo_token: ${{ secrets.NC_GITHUB_TOKEN }} file: mac-dist/** tag: ${{ github.event.inputs.tag || inputs.tag }} overwrite: true diff --git a/.github/workflows/release-nightly-dev.yml b/.github/workflows/release-nightly-dev.yml index 7f4d7522d1..76322d0135 100644 --- a/.github/workflows/release-nightly-dev.yml +++ b/.github/workflows/release-nightly-dev.yml @@ -54,6 +54,8 @@ jobs: uses: ./.github/workflows/release-executables.yml with: tag: ${{ needs.set-tag.outputs.current_version }}-${{ needs.set-tag.outputs.nightly_build_tag }} + secrets: + NC_GITHUB_TOKEN: "${{ secrets.NC_GITHUB_TOKEN }}" # Build docker image and push to docker hub release-docker: diff --git a/.github/workflows/release-pr.yml b/.github/workflows/release-pr.yml index b698f3ccc4..5276ff35f6 100644 --- a/.github/workflows/release-pr.yml +++ b/.github/workflows/release-pr.yml @@ -83,6 +83,8 @@ jobs: uses: ./.github/workflows/release-executables.yml with: tag: ${{ needs.set-tag.outputs.current_version }}-${{ needs.set-tag.outputs.target_tag }} + secrets: + NC_GITHUB_TOKEN: "${{ secrets.NC_GITHUB_TOKEN }}" # leave-comment: # runs-on: 'ubuntu-latest' From f1e7c8fa51efde4ff89e794d47485d2e6de7f514 Mon Sep 17 00:00:00 2001 From: Pranav C Date: Mon, 20 Jun 2022 12:30:19 +0530 Subject: [PATCH 08/18] chore: set commit user as github bot Signed-off-by: Pranav C --- .github/workflows/release-executables.yml | 4 ++-- .github/workflows/release-pr.yml | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/release-executables.yml b/.github/workflows/release-executables.yml index 2d5fdd29e3..4ef2a4dd25 100644 --- a/.github/workflows/release-executables.yml +++ b/.github/workflows/release-executables.yml @@ -66,8 +66,8 @@ jobs: run: | npm i -E nocodb-daily@$TAG - git config --global user.name "Pranav C" - git config --global user.email "pranavxc@gmail.com" + git config user.name 'github-actions[bot]' + git config user.email 'github-actions[bot]@users.noreply.github.com' git commit package.json -m "Update to $TAG" git tag $TAG diff --git a/.github/workflows/release-pr.yml b/.github/workflows/release-pr.yml index 5276ff35f6..4a33b6e565 100644 --- a/.github/workflows/release-pr.yml +++ b/.github/workflows/release-pr.yml @@ -114,7 +114,7 @@ jobs: - uses: peter-evans/commit-comment@v2 with: body: | - The PR changes have been deployed as executables. Pleae visit following link to download executables : https://github.com/nocodb/nocodb-timely/releases/tag/${{ needs.set-tag.outputs.target_tag }} + The PR changes have been deployed as executables. Pleae visit following link to download executables : https://github.com/nocodb/nocodb-timely/releases/tag/${{ needs.set-tag.outputs.current_version }}-${{ needs.set-tag.outputs.target_tag }} # if-merged: # if: github.event.pull_request.merged == true From 9c18c333ed4a340a4b8ff4c95d0bdfbe7e0a4d08 Mon Sep 17 00:00:00 2001 From: Pranav C Date: Mon, 20 Jun 2022 12:56:03 +0530 Subject: [PATCH 09/18] chore: add `set-tag` reference Signed-off-by: Pranav C --- .github/workflows/release-pr.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/release-pr.yml b/.github/workflows/release-pr.yml index 4a33b6e565..37f76b93eb 100644 --- a/.github/workflows/release-pr.yml +++ b/.github/workflows/release-pr.yml @@ -109,7 +109,7 @@ jobs: leave-executable-comment: if: ${{ github.actor != 'dependabot[bot]' && github.event.pull_request.draft == false }} runs-on: 'ubuntu-latest' - needs: [release-executables] + needs: [release-executables, set-tag] steps: - uses: peter-evans/commit-comment@v2 with: From c8ebf5a4a5a918a8686d1084ae9a88c200f5c9cf Mon Sep 17 00:00:00 2001 From: Pranav C Date: Mon, 20 Jun 2022 13:31:12 +0530 Subject: [PATCH 10/18] refactor: action config cleanup Signed-off-by: Pranav C --- .github/workflows/release-executables.yml | 19 +++++++------------ 1 file changed, 7 insertions(+), 12 deletions(-) diff --git a/.github/workflows/release-executables.yml b/.github/workflows/release-executables.yml index 4ef2a4dd25..43c460f282 100644 --- a/.github/workflows/release-executables.yml +++ b/.github/workflows/release-executables.yml @@ -6,7 +6,8 @@ on: inputs: tag: description: "Timely version" - required: true # Triggered by release-nocodb.yml / release-nightly-dev.yml / release-pr.yml + required: true + # Triggered by release-nightly-dev.yml / release-pr.yml workflow_call: inputs: tag: @@ -80,23 +81,15 @@ jobs: - name : Install dependencies and build executables run: | + # install npm dependendencies npm i - # npm i --target_arch=x64 --target_platform=darwin - - # npx node-pre-gyp install --directory=./node_modules/sqlite3 --target_platform=win32 --target_arch=ia32 - # npx node-pre-gyp install --directory=./node_modules/sqlite3 --target_platform=darwin --target_arch=x64 - # npx node-pre-gyp install --directory=./node_modules/sqlite3 --target_platform=darwin --target_arch=arm - # npx node-pre-gyp install --directory=./node_modules/sqlite3 --target_platform=linux --target_arch=x64 - # npx node-pre-gyp install --directory=./node_modules/sqlite3 --target_platform=linux --target_arch=arm - # Copy sqlite binaries rsync -rvzhP ./binaries/binding/ ./node_modules/sqlite3/lib/binding/ # clean up code to optimize size npx modclean --patterns="default:*" --ignore="nc-lib-gui/**,dayjs/**,express-status-monitor/**,sqlite3/**" --run - # build executables npm run build @@ -104,6 +97,7 @@ jobs: mv ./dist/Noco-macos-arm64 ./mac-dist/ mv ./dist/Noco-macos-x64 ./mac-dist/ + # Compress executables GZIP=-9 tar -czvf ./dist/Noco-linux-x64.tar.gz ./dist/Noco-linux-x64 GZIP=-9 tar -czvf ./dist/Noco-win-x64.tar.gz ./dist/Noco-win-x64.exe GZIP=-9 tar -czvf ./dist/Noco-linux-arm64.tar.gz ./dist/Noco-linux-arm64 @@ -135,7 +129,8 @@ jobs: name: executables path: mac-dist - - run: | + - name: Sign macOS executables + run: | /usr/bin/codesign --force -s - ./mac-dist/Noco-macos-arm64 -v /usr/bin/codesign --force -s - ./mac-dist/Noco-macos-x64 -v @@ -146,7 +141,7 @@ jobs: retention-days: 1 - publish: + publish-mac-executables: needs: sign-mac-executables runs-on: ubuntu-latest steps: From 7c4c5640da7c58d8e1400fcbd4e88c61e68db0fa Mon Sep 17 00:00:00 2001 From: Pranav C Date: Mon, 20 Jun 2022 13:34:54 +0530 Subject: [PATCH 11/18] chore: set temporary artifact name as tag name to avoid conflict Signed-off-by: Pranav C --- .github/workflows/release-executables.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/release-executables.yml b/.github/workflows/release-executables.yml index 43c460f282..b2237229af 100644 --- a/.github/workflows/release-executables.yml +++ b/.github/workflows/release-executables.yml @@ -115,7 +115,7 @@ jobs: - uses: actions/upload-artifact@master with: - name: executables + name: ${{ github.event.inputs.tag || inputs.tag }} path: mac-dist retention-days: 1 @@ -126,7 +126,7 @@ jobs: - uses: actions/download-artifact@master with: - name: executables + name: ${{ github.event.inputs.tag || inputs.tag }} path: mac-dist - name: Sign macOS executables @@ -136,7 +136,7 @@ jobs: - uses: actions/upload-artifact@master with: - name: executables + name: ${{ github.event.inputs.tag || inputs.tag }} path: mac-dist retention-days: 1 @@ -147,7 +147,7 @@ jobs: steps: - uses: actions/download-artifact@master with: - name: executables + name: ${{ github.event.inputs.tag || inputs.tag }} path: mac-dist - name: Compress files run: | From 236c88d0860620105c22279ca21855f1bd1fb20a Mon Sep 17 00:00:00 2001 From: Pranav C Date: Mon, 20 Jun 2022 16:18:44 +0530 Subject: [PATCH 12/18] chore: update comment body Signed-off-by: Pranav C --- .github/workflows/release-pr.yml | 26 +++++++++++++++++++++++++- 1 file changed, 25 insertions(+), 1 deletion(-) diff --git a/.github/workflows/release-pr.yml b/.github/workflows/release-pr.yml index 37f76b93eb..403501c4e7 100644 --- a/.github/workflows/release-pr.yml +++ b/.github/workflows/release-pr.yml @@ -114,7 +114,31 @@ jobs: - uses: peter-evans/commit-comment@v2 with: body: | - The PR changes have been deployed as executables. Pleae visit following link to download executables : https://github.com/nocodb/nocodb-timely/releases/tag/${{ needs.set-tag.outputs.current_version }}-${{ needs.set-tag.outputs.target_tag }} + ### Run Executables + + #### MacOS + + ```bash + curl https://github.com/nocodb/nocodb-timely/releases/download/${{ needs.set-tag.outputs.current_version }}-${{ needs.set-tag.outputs.target_tag }}/Noco-linux-arm64 \ + && chmod +x Noco-linux-arm64 \ + && ./Noco-linux-arm64 + ``` + #### Linux + + ```bash + curl https://github.com/nocodb/nocodb-timely/releases/download/${{ needs.set-tag.outputs.current_version }}-${{ needs.set-tag.outputs.target_tag }}/Noco-linux-x64 \ + && chmod +x Noco-linux-x64 \ + && ./Noco-linux-x64 + ``` + #### windows + + ```bash + iwp https://github.com/nocodb/nocodb-timely/releases/download/${{ needs.set-tag.outputs.current_version }}-${{ needs.set-tag.outputs.target_tag }}/Noco-win-arm64.exe + .\Noco-win-arm64.exe + ``` + + For executables visit [here](https://github.com/nocodb/nocodb-timely/releases/tag/${{ needs.set-tag.outputs.current_version }}-${{ needs.set-tag.outputs.target_tag }}) + # if-merged: # if: github.event.pull_request.merged == true From 9d9bded1b63352082f6891e926b0640fef9b86a7 Mon Sep 17 00:00:00 2001 From: Pranav C Date: Mon, 20 Jun 2022 16:41:31 +0530 Subject: [PATCH 13/18] chore: file name correction Signed-off-by: Pranav C --- .github/workflows/release-pr.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/release-pr.yml b/.github/workflows/release-pr.yml index 403501c4e7..6960d1a268 100644 --- a/.github/workflows/release-pr.yml +++ b/.github/workflows/release-pr.yml @@ -119,8 +119,8 @@ jobs: #### MacOS ```bash - curl https://github.com/nocodb/nocodb-timely/releases/download/${{ needs.set-tag.outputs.current_version }}-${{ needs.set-tag.outputs.target_tag }}/Noco-linux-arm64 \ - && chmod +x Noco-linux-arm64 \ + curl https://github.com/nocodb/nocodb-timely/releases/download/${{ needs.set-tag.outputs.current_version }}-${{ needs.set-tag.outputs.target_tag }}/Noco-macos-arm64 \ + && chmod +x Noco-macos-arm64 \ && ./Noco-linux-arm64 ``` #### Linux From d7e0b449d7b6d63007fa1cc8ee0913012d94c6d1 Mon Sep 17 00:00:00 2001 From: Pranav C Date: Mon, 20 Jun 2022 16:49:00 +0530 Subject: [PATCH 14/18] chore: update curl command to follow redirect Signed-off-by: Pranav C --- .github/workflows/release-pr.yml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/release-pr.yml b/.github/workflows/release-pr.yml index 6960d1a268..0a4453b985 100644 --- a/.github/workflows/release-pr.yml +++ b/.github/workflows/release-pr.yml @@ -119,16 +119,16 @@ jobs: #### MacOS ```bash - curl https://github.com/nocodb/nocodb-timely/releases/download/${{ needs.set-tag.outputs.current_version }}-${{ needs.set-tag.outputs.target_tag }}/Noco-macos-arm64 \ - && chmod +x Noco-macos-arm64 \ - && ./Noco-linux-arm64 + curl https://github.com/nocodb/nocodb-timely/releases/download/${{ needs.set-tag.outputs.current_version }}-${{ needs.set-tag.outputs.target_tag }}/Noco-macos-arm64 -o Noco -L \ + && chmod +x Noco \ + && ./Noco ``` #### Linux ```bash - curl https://github.com/nocodb/nocodb-timely/releases/download/${{ needs.set-tag.outputs.current_version }}-${{ needs.set-tag.outputs.target_tag }}/Noco-linux-x64 \ - && chmod +x Noco-linux-x64 \ - && ./Noco-linux-x64 + curl https://github.com/nocodb/nocodb-timely/releases/download/${{ needs.set-tag.outputs.current_version }}-${{ needs.set-tag.outputs.target_tag }}/Noco-linux-x64 -o Noco -L \ + && chmod +x Noco \ + && ./Noco ``` #### windows From 276839df1ddbdca73c57ffbb837c6c2cf5cd25ac Mon Sep 17 00:00:00 2001 From: Pranav C Date: Mon, 20 Jun 2022 18:27:37 +0530 Subject: [PATCH 15/18] chore: exclude nc-lib-gui from modclean Signed-off-by: Pranav C --- .github/workflows/release-executables.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/release-executables.yml b/.github/workflows/release-executables.yml index b2237229af..3857df89d6 100644 --- a/.github/workflows/release-executables.yml +++ b/.github/workflows/release-executables.yml @@ -88,7 +88,7 @@ jobs: rsync -rvzhP ./binaries/binding/ ./node_modules/sqlite3/lib/binding/ # clean up code to optimize size - npx modclean --patterns="default:*" --ignore="nc-lib-gui/**,dayjs/**,express-status-monitor/**,sqlite3/**" --run + npx modclean --patterns="default:*" --ignore="nc-lib-gui-daily/**,dayjs/**,express-status-monitor/**,sqlite3/**" --run # build executables npm run build From d890972904169781e3f8a0c91847ec02f35e6e38 Mon Sep 17 00:00:00 2001 From: Pranav C Date: Mon, 20 Jun 2022 19:12:24 +0530 Subject: [PATCH 16/18] chore(action): shorten url Signed-off-by: Pranav C --- .github/workflows/release-pr.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/release-pr.yml b/.github/workflows/release-pr.yml index 0a4453b985..25ac89b0f4 100644 --- a/.github/workflows/release-pr.yml +++ b/.github/workflows/release-pr.yml @@ -119,21 +119,21 @@ jobs: #### MacOS ```bash - curl https://github.com/nocodb/nocodb-timely/releases/download/${{ needs.set-tag.outputs.current_version }}-${{ needs.set-tag.outputs.target_tag }}/Noco-macos-arm64 -o Noco -L \ + curl http://dl.nocodb.com/${{ needs.set-tag.outputs.current_version }}-${{ needs.set-tag.outputs.target_tag }}/Noco-macos-arm64 -o Noco -L \ && chmod +x Noco \ && ./Noco ``` #### Linux ```bash - curl https://github.com/nocodb/nocodb-timely/releases/download/${{ needs.set-tag.outputs.current_version }}-${{ needs.set-tag.outputs.target_tag }}/Noco-linux-x64 -o Noco -L \ + curl http://dl.nocodb.com/${{ needs.set-tag.outputs.current_version }}-${{ needs.set-tag.outputs.target_tag }}/Noco-linux-x64 -o Noco -L \ && chmod +x Noco \ && ./Noco ``` #### windows ```bash - iwp https://github.com/nocodb/nocodb-timely/releases/download/${{ needs.set-tag.outputs.current_version }}-${{ needs.set-tag.outputs.target_tag }}/Noco-win-arm64.exe + iwp http://dl.nocodb.com/${{ needs.set-tag.outputs.current_version }}-${{ needs.set-tag.outputs.target_tag }}/Noco-win-arm64.exe .\Noco-win-arm64.exe ``` From 912eeb9ca4675af7a9643495beec57a590c3238d Mon Sep 17 00:00:00 2001 From: Pranav C Date: Mon, 20 Jun 2022 19:27:26 +0530 Subject: [PATCH 17/18] chore(action): update script to create folder and navigate to it Signed-off-by: Pranav C --- .github/workflows/release-pr.yml | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/.github/workflows/release-pr.yml b/.github/workflows/release-pr.yml index 25ac89b0f4..fa1562815b 100644 --- a/.github/workflows/release-pr.yml +++ b/.github/workflows/release-pr.yml @@ -119,16 +119,20 @@ jobs: #### MacOS ```bash - curl http://dl.nocodb.com/${{ needs.set-tag.outputs.current_version }}-${{ needs.set-tag.outputs.target_tag }}/Noco-macos-arm64 -o Noco -L \ + mkdir -p ./${{ needs.set-tag.outputs.current_version }}/${{ needs.set-tag.outputs.target_tag }} \ + && cd ./${{ needs.set-tag.outputs.current_version }}/${{ needs.set-tag.outputs.target_tag }} \ + && curl http://dl.nocodb.com/${{ needs.set-tag.outputs.current_version }}-${{ needs.set-tag.outputs.target_tag }}/Noco-macos-arm64 -o Noco -L \ && chmod +x Noco \ && ./Noco ``` #### Linux ```bash - curl http://dl.nocodb.com/${{ needs.set-tag.outputs.current_version }}-${{ needs.set-tag.outputs.target_tag }}/Noco-linux-x64 -o Noco -L \ - && chmod +x Noco \ - && ./Noco + mkdir -p ./${{ needs.set-tag.outputs.current_version }}/${{ needs.set-tag.outputs.target_tag }} \ + && cd ./${{ needs.set-tag.outputs.current_version }}/${{ needs.set-tag.outputs.target_tag }} \ + && curl http://dl.nocodb.com/${{ needs.set-tag.outputs.current_version }}-${{ needs.set-tag.outputs.target_tag }}/Noco-linux-x64 -o Noco -L \ + && chmod +x Noco \ + && ./Noco ``` #### windows From c6b5c677b2b377bc2695b719f6e5df052fc3773e Mon Sep 17 00:00:00 2001 From: Pranav C Date: Mon, 20 Jun 2022 20:07:01 +0530 Subject: [PATCH 18/18] chore(action): keep file name as `noco` Signed-off-by: Pranav C --- .github/workflows/release-pr.yml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/release-pr.yml b/.github/workflows/release-pr.yml index fa1562815b..70aeed0bb0 100644 --- a/.github/workflows/release-pr.yml +++ b/.github/workflows/release-pr.yml @@ -121,18 +121,18 @@ jobs: ```bash mkdir -p ./${{ needs.set-tag.outputs.current_version }}/${{ needs.set-tag.outputs.target_tag }} \ && cd ./${{ needs.set-tag.outputs.current_version }}/${{ needs.set-tag.outputs.target_tag }} \ - && curl http://dl.nocodb.com/${{ needs.set-tag.outputs.current_version }}-${{ needs.set-tag.outputs.target_tag }}/Noco-macos-arm64 -o Noco -L \ - && chmod +x Noco \ - && ./Noco + && curl http://dl.nocodb.com/${{ needs.set-tag.outputs.current_version }}-${{ needs.set-tag.outputs.target_tag }}/Noco-macos-arm64 -o noco -L \ + && chmod +x noco \ + && ./noco ``` #### Linux ```bash mkdir -p ./${{ needs.set-tag.outputs.current_version }}/${{ needs.set-tag.outputs.target_tag }} \ && cd ./${{ needs.set-tag.outputs.current_version }}/${{ needs.set-tag.outputs.target_tag }} \ - && curl http://dl.nocodb.com/${{ needs.set-tag.outputs.current_version }}-${{ needs.set-tag.outputs.target_tag }}/Noco-linux-x64 -o Noco -L \ - && chmod +x Noco \ - && ./Noco + && curl http://dl.nocodb.com/${{ needs.set-tag.outputs.current_version }}-${{ needs.set-tag.outputs.target_tag }}/Noco-linux-x64 -o noco -L \ + && chmod +x noco \ + && ./noco ``` #### windows