From d62e4f47112b28c122104ef059cfe3f002385e45 Mon Sep 17 00:00:00 2001 From: jokaorgua Date: Thu, 5 May 2022 16:36:52 +0200 Subject: [PATCH 01/16] Update release-build.yml added support of aarch64 deb packets --- .github/workflows/release-build.yml | 63 +++++++++++++++++++++++++++++ 1 file changed, 63 insertions(+) diff --git a/.github/workflows/release-build.yml b/.github/workflows/release-build.yml index f546d3b5d23..9fca77a0a50 100644 --- a/.github/workflows/release-build.yml +++ b/.github/workflows/release-build.yml @@ -10,6 +10,69 @@ concurrency: cancel-in-progress: true jobs: + name: Release Build + +on: + push: + branches: + - 'release/**' + +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + +jobs: + build-and-upload-release-artifacts-aarch64: + runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + include: + - arch: aarch64 + distro: ubuntu_latest + csc_link_secret: '' + csc_key_password_secret: '' + steps: + - name: Checkout branch + uses: uraimo/run-on-arch-action@v2 + uses: actions/checkout@v3 + + - name: Setup Node + uses: actions/setup-node@v3 + with: + node-version-file: '.nvmrc' + + - name: Bootstrap packages + run: npm run bootstrap + + - name: Package app + shell: bash + run: npm run app-package + env: + CSC_LINK: ${{ matrix.csc_link_secret != '' && secrets[matrix.csc_link_secret] || '' }} + CSC_KEY_PASSWORD: ${{ matrix.csc_key_password_secret != '' && secrets[matrix.csc_key_password_secret] || '' }} + + - name: Setup Inso CLI version env var + run: + echo "INSO_VERSION=$(jq .version packages/insomnia-inso/package.json -rj)" >> $GITHUB_ENV + + - name: Package inso + run: npm run inso-package + env: + VERSION: ${{ env.INSO_VERSION }} + + - name: Create inso artifacts + run: npm run inso-package:artifacts + + - name: Upload artifacts + uses: actions/upload-artifact@v3 + with: + if-no-files-found: ignore + name: ${{ matrix.os }}-${{matrix.arch}}-artifacts + path: | + packages/insomnia/dist/*.deb + + build-and-upload-release-artifacts: runs-on: ${{ matrix.os }} strategy: From 31b33da9b688426d6d7e20f4c1959c93d9706cdf Mon Sep 17 00:00:00 2001 From: jokaorgua Date: Thu, 5 May 2022 16:39:53 +0200 Subject: [PATCH 02/16] Update release-build.yml --- .github/workflows/release-build.yml | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/.github/workflows/release-build.yml b/.github/workflows/release-build.yml index 9fca77a0a50..4ab6ab954ee 100644 --- a/.github/workflows/release-build.yml +++ b/.github/workflows/release-build.yml @@ -11,17 +11,6 @@ concurrency: jobs: name: Release Build - -on: - push: - branches: - - 'release/**' - -concurrency: - group: ${{ github.workflow }}-${{ github.ref }} - cancel-in-progress: true - -jobs: build-and-upload-release-artifacts-aarch64: runs-on: ubuntu-latest strategy: From bf1e22dd6e634b44fc4e5d90616ed4fc736acc0a Mon Sep 17 00:00:00 2001 From: jokaorgua Date: Thu, 5 May 2022 16:41:07 +0200 Subject: [PATCH 03/16] Update release-build.yml --- .github/workflows/release-build.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/release-build.yml b/.github/workflows/release-build.yml index 4ab6ab954ee..4765834444e 100644 --- a/.github/workflows/release-build.yml +++ b/.github/workflows/release-build.yml @@ -10,7 +10,6 @@ concurrency: cancel-in-progress: true jobs: - name: Release Build build-and-upload-release-artifacts-aarch64: runs-on: ubuntu-latest strategy: From 20da1d752841ce7e8cdfab6e5de161f160fd754b Mon Sep 17 00:00:00 2001 From: jokaorgua Date: Fri, 6 May 2022 08:22:22 +0200 Subject: [PATCH 04/16] Update release-recurring.yml --- .github/workflows/release-recurring.yml | 39 +++++++++++++++++++++++++ 1 file changed, 39 insertions(+) diff --git a/.github/workflows/release-recurring.yml b/.github/workflows/release-recurring.yml index b8dd6c90c48..eeadaa6f2b5 100644 --- a/.github/workflows/release-recurring.yml +++ b/.github/workflows/release-recurring.yml @@ -15,6 +15,45 @@ concurrency: env: PR_NUMBER: ${{ github.event.number }} jobs: + build-and-upload-release-artifacts-aarch64: + runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + include: + - arch: aarch64 + distro: ubuntu_latest + build-targets: "deb" + os: ubuntu-latest + steps: + - uses: uraimo/run-on-arch-action@v2 + - uses: actions/checkout@v3 + name: Checkout branch + + - name: Setup Node + uses: actions/setup-node@v3 + with: + node-version-file: '.nvmrc' + + - name: Bootstrap packages + run: npm run bootstrap + + - name: Bump version + shell: bash + run: BUILD_REF="$(git rev-parse --short HEAD)${{ github.event_name == 'pull_request' && '.pr-$PR_NUMBER' || '' }}" npm run app-bump-version + + - name: Package + shell: bash + run: BUILD_TARGETS='${{ matrix.build-targets }}' npm run app-package + + - name: Upload artifacts + uses: actions/upload-artifact@v3 + with: + if-no-files-found: ignore + name: ${{ matrix.os }}-${{matrix.arch}}-artifacts-${{ github.run_number }} + path: | + packages/insomnia/dist/*.deb + build-and-upload-artifacts: # Skip jobs for release PRs if: "!startsWith(github.head_ref, 'release/')" From b4a9e9a05495b16cd0f41ce9ff158e552a5caf92 Mon Sep 17 00:00:00 2001 From: jokaorgua Date: Fri, 6 May 2022 08:30:28 +0200 Subject: [PATCH 05/16] Update release-recurring.yml --- .github/workflows/release-recurring.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/release-recurring.yml b/.github/workflows/release-recurring.yml index eeadaa6f2b5..7166a676618 100644 --- a/.github/workflows/release-recurring.yml +++ b/.github/workflows/release-recurring.yml @@ -27,6 +27,8 @@ jobs: os: ubuntu-latest steps: - uses: uraimo/run-on-arch-action@v2 + with: + run: echo "we are here" - uses: actions/checkout@v3 name: Checkout branch From a51972ca4f2690c52efa7a0429553f3eb3084a81 Mon Sep 17 00:00:00 2001 From: jokaorgua Date: Fri, 6 May 2022 08:32:49 +0200 Subject: [PATCH 06/16] Update release-recurring.yml --- .github/workflows/release-recurring.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/release-recurring.yml b/.github/workflows/release-recurring.yml index 7166a676618..a4f9264694f 100644 --- a/.github/workflows/release-recurring.yml +++ b/.github/workflows/release-recurring.yml @@ -28,7 +28,7 @@ jobs: steps: - uses: uraimo/run-on-arch-action@v2 with: - run: echo "we are here" + run: uname -a - uses: actions/checkout@v3 name: Checkout branch From cd35f1bc7e08780709a3105ecf2c139b2c5bca6f Mon Sep 17 00:00:00 2001 From: jokaorgua Date: Fri, 6 May 2022 08:48:00 +0200 Subject: [PATCH 07/16] Update release-build.yml --- .github/workflows/release-build.yml | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/.github/workflows/release-build.yml b/.github/workflows/release-build.yml index 4765834444e..077654e6fe1 100644 --- a/.github/workflows/release-build.yml +++ b/.github/workflows/release-build.yml @@ -21,9 +21,11 @@ jobs: csc_link_secret: '' csc_key_password_secret: '' steps: - - name: Checkout branch - uses: uraimo/run-on-arch-action@v2 - uses: actions/checkout@v3 + - uses: uraimo/run-on-arch-action@v2 + with: + run: uname -a + - uses: actions/checkout@v3 + name: Checkout branch - name: Setup Node uses: actions/setup-node@v3 From 6f71482a3b3388da81a27a4aaf9f4a31976baf92 Mon Sep 17 00:00:00 2001 From: jokaorgua Date: Fri, 6 May 2022 11:48:22 +0200 Subject: [PATCH 08/16] Update release-recurring.yml updated fpm for building aarch64 --- .github/workflows/release-recurring.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/workflows/release-recurring.yml b/.github/workflows/release-recurring.yml index a4f9264694f..ccca24c2368 100644 --- a/.github/workflows/release-recurring.yml +++ b/.github/workflows/release-recurring.yml @@ -29,6 +29,9 @@ jobs: - uses: uraimo/run-on-arch-action@v2 with: run: uname -a + - name: Install updated fpm + run: sudo apt-get install ruby-dev build-essential && sudo gem i fpm -f + - uses: actions/checkout@v3 name: Checkout branch @@ -46,7 +49,7 @@ jobs: - name: Package shell: bash - run: BUILD_TARGETS='${{ matrix.build-targets }}' npm run app-package + run: USE_SYSTEM_FPM=true BUILD_TARGETS='${{ matrix.build-targets }}' npm run app-package - name: Upload artifacts uses: actions/upload-artifact@v3 From 3c613cae48d8b37c482bc7141fc763828d1eca9e Mon Sep 17 00:00:00 2001 From: jokaorgua Date: Fri, 6 May 2022 11:57:37 +0200 Subject: [PATCH 09/16] Update release-build.yml added using system fpm --- .github/workflows/release-build.yml | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/.github/workflows/release-build.yml b/.github/workflows/release-build.yml index 077654e6fe1..9cb1ad232de 100644 --- a/.github/workflows/release-build.yml +++ b/.github/workflows/release-build.yml @@ -24,6 +24,10 @@ jobs: - uses: uraimo/run-on-arch-action@v2 with: run: uname -a + + - name: Install updated fpm + run: sudo apt-get install ruby-dev build-essential && sudo gem i fpm -f + - uses: actions/checkout@v3 name: Checkout branch @@ -47,12 +51,12 @@ jobs: echo "INSO_VERSION=$(jq .version packages/insomnia-inso/package.json -rj)" >> $GITHUB_ENV - name: Package inso - run: npm run inso-package + run: USE_SYSTEM_FPM=true npm run inso-package env: VERSION: ${{ env.INSO_VERSION }} - name: Create inso artifacts - run: npm run inso-package:artifacts + run: USE_SYSTEM_FPM=true npm run inso-package:artifacts - name: Upload artifacts uses: actions/upload-artifact@v3 From e6d45b1e43f7bd8692ae6135af6835089bc72849 Mon Sep 17 00:00:00 2001 From: jokaorgua Date: Fri, 6 May 2022 12:01:29 +0200 Subject: [PATCH 10/16] Update release-recurring.yml --- .github/workflows/release-recurring.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/release-recurring.yml b/.github/workflows/release-recurring.yml index ccca24c2368..86fdea66d11 100644 --- a/.github/workflows/release-recurring.yml +++ b/.github/workflows/release-recurring.yml @@ -49,7 +49,7 @@ jobs: - name: Package shell: bash - run: USE_SYSTEM_FPM=true BUILD_TARGETS='${{ matrix.build-targets }}' npm run app-package + run: uname -a && USE_SYSTEM_FPM=true BUILD_TARGETS='${{ matrix.build-targets }}' npm run app-package - name: Upload artifacts uses: actions/upload-artifact@v3 From 98a6a56c5c74e287dc935303740186317761cf04 Mon Sep 17 00:00:00 2001 From: jokaorgua Date: Fri, 6 May 2022 13:39:54 +0200 Subject: [PATCH 11/16] Update release-recurring.yml --- .github/workflows/release-recurring.yml | 30 +++++++++---------------- 1 file changed, 11 insertions(+), 19 deletions(-) diff --git a/.github/workflows/release-recurring.yml b/.github/workflows/release-recurring.yml index 86fdea66d11..692c76d512b 100644 --- a/.github/workflows/release-recurring.yml +++ b/.github/workflows/release-recurring.yml @@ -26,31 +26,23 @@ jobs: build-targets: "deb" os: ubuntu-latest steps: - - uses: uraimo/run-on-arch-action@v2 - with: - run: uname -a - - name: Install updated fpm - run: sudo apt-get install ruby-dev build-essential && sudo gem i fpm -f - - uses: actions/checkout@v3 name: Checkout branch - - name: Setup Node uses: actions/setup-node@v3 with: node-version-file: '.nvmrc' - - - name: Bootstrap packages - run: npm run bootstrap - - - name: Bump version - shell: bash - run: BUILD_REF="$(git rev-parse --short HEAD)${{ github.event_name == 'pull_request' && '.pr-$PR_NUMBER' || '' }}" npm run app-bump-version - - - name: Package - shell: bash - run: uname -a && USE_SYSTEM_FPM=true BUILD_TARGETS='${{ matrix.build-targets }}' npm run app-package - + arch: aarch64 + + - uses: uraimo/run-on-arch-action@v2 + with: + run: | + #install fpm + sudo apt-get install ruby-dev build-essential && sudo gem i fpm -f + npm run bootstrap + BUILD_REF="$(git rev-parse --short HEAD)${{ github.event_name == 'pull_request' && '.pr-$PR_NUMBER' || '' }}" npm run app-bump-version + USE_SYSTEM_FPM=true BUILD_TARGETS='${{ matrix.build-targets }}' npm run app-package + - name: Upload artifacts uses: actions/upload-artifact@v3 with: From f5b7726d4963ae6234e788c372b146a72b829237 Mon Sep 17 00:00:00 2001 From: jokaorgua Date: Thu, 12 May 2022 14:46:23 +0200 Subject: [PATCH 12/16] Update release-recurring.yml seems to be working node setup container on aarch64 --- .github/workflows/release-recurring.yml | 25 ++++++++++++++++--------- 1 file changed, 16 insertions(+), 9 deletions(-) diff --git a/.github/workflows/release-recurring.yml b/.github/workflows/release-recurring.yml index 692c76d512b..0fc8455e478 100644 --- a/.github/workflows/release-recurring.yml +++ b/.github/workflows/release-recurring.yml @@ -28,21 +28,28 @@ jobs: steps: - uses: actions/checkout@v3 name: Checkout branch - - name: Setup Node - uses: actions/setup-node@v3 - with: - node-version-file: '.nvmrc' - arch: aarch64 - - uses: uraimo/run-on-arch-action@v2 + name: setup aarch container with: + arch: ${{ matrix.arch }} + distro: ${{ matrix.distro }} + # Not required, but speeds up builds + githubToken: ${{ github.token }} + shell: /bin/sh + # Mount the artifacts directory as /artifacts in the container + dockerRunArgs: | + --volume \"${PWD}:/app\" + install: | + apt update + apt install -y curl ruby-dev build-essential + curl -sL https://deb.nodesource.com/setup_16.x | bash - + apt install -y nodejs + gem i fpm -f run: | - #install fpm - sudo apt-get install ruby-dev build-essential && sudo gem i fpm -f + cd /app npm run bootstrap BUILD_REF="$(git rev-parse --short HEAD)${{ github.event_name == 'pull_request' && '.pr-$PR_NUMBER' || '' }}" npm run app-bump-version USE_SYSTEM_FPM=true BUILD_TARGETS='${{ matrix.build-targets }}' npm run app-package - - name: Upload artifacts uses: actions/upload-artifact@v3 with: From 154e1c68b688ca5b56fa530be8cc9b99991266e2 Mon Sep 17 00:00:00 2001 From: jokaorgua Date: Thu, 12 May 2022 14:53:33 +0200 Subject: [PATCH 13/16] Update release-recurring.yml fixed permissions bug with logs for npm --- .github/workflows/release-recurring.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/release-recurring.yml b/.github/workflows/release-recurring.yml index 0fc8455e478..0b73d217206 100644 --- a/.github/workflows/release-recurring.yml +++ b/.github/workflows/release-recurring.yml @@ -47,6 +47,7 @@ jobs: gem i fpm -f run: | cd /app + chown -R 1001:121 "/root/.npm" npm run bootstrap BUILD_REF="$(git rev-parse --short HEAD)${{ github.event_name == 'pull_request' && '.pr-$PR_NUMBER' || '' }}" npm run app-bump-version USE_SYSTEM_FPM=true BUILD_TARGETS='${{ matrix.build-targets }}' npm run app-package From 0f3b0552423f7117b7103e27e8330be510f0aebc Mon Sep 17 00:00:00 2001 From: jokaorgua Date: Thu, 12 May 2022 15:04:00 +0200 Subject: [PATCH 14/16] Update release-recurring.yml --- .github/workflows/release-recurring.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/release-recurring.yml b/.github/workflows/release-recurring.yml index 0b73d217206..d43094d6d29 100644 --- a/.github/workflows/release-recurring.yml +++ b/.github/workflows/release-recurring.yml @@ -47,6 +47,7 @@ jobs: gem i fpm -f run: | cd /app + npm install chown -R 1001:121 "/root/.npm" npm run bootstrap BUILD_REF="$(git rev-parse --short HEAD)${{ github.event_name == 'pull_request' && '.pr-$PR_NUMBER' || '' }}" npm run app-bump-version From 409576e40e84324795728c42128430b51a1bc5c4 Mon Sep 17 00:00:00 2001 From: jokaorgua Date: Thu, 12 May 2022 15:24:36 +0200 Subject: [PATCH 15/16] Update release-recurring.yml found a way how to install needed nodejs without nvm --- .github/workflows/release-recurring.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/release-recurring.yml b/.github/workflows/release-recurring.yml index d43094d6d29..ff91725bc7e 100644 --- a/.github/workflows/release-recurring.yml +++ b/.github/workflows/release-recurring.yml @@ -45,8 +45,11 @@ jobs: curl -sL https://deb.nodesource.com/setup_16.x | bash - apt install -y nodejs gem i fpm -f + npm install -g npm@latest run: | cd /app + npm install -g n + n `cat .nvmrc` npm install chown -R 1001:121 "/root/.npm" npm run bootstrap From c89d6090c2edd4a55d6b8cba859d987d7229ed79 Mon Sep 17 00:00:00 2001 From: jokaorgua Date: Thu, 12 May 2022 15:50:07 +0200 Subject: [PATCH 16/16] Update release-recurring.yml trying to make npm working --- .github/workflows/release-recurring.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/release-recurring.yml b/.github/workflows/release-recurring.yml index ff91725bc7e..6a8956ae90e 100644 --- a/.github/workflows/release-recurring.yml +++ b/.github/workflows/release-recurring.yml @@ -48,10 +48,10 @@ jobs: npm install -g npm@latest run: | cd /app + npm config set -g user=`whoami` npm install -g n n `cat .nvmrc` npm install - chown -R 1001:121 "/root/.npm" npm run bootstrap BUILD_REF="$(git rev-parse --short HEAD)${{ github.event_name == 'pull_request' && '.pr-$PR_NUMBER' || '' }}" npm run app-bump-version USE_SYSTEM_FPM=true BUILD_TARGETS='${{ matrix.build-targets }}' npm run app-package