diff --git a/.github/workflows/release-build.yml b/.github/workflows/release-build.yml index f546d3b5d23..9cb1ad232de 100644 --- a/.github/workflows/release-build.yml +++ b/.github/workflows/release-build.yml @@ -10,6 +10,63 @@ concurrency: 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: + - 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: 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: USE_SYSTEM_FPM=true npm run inso-package + env: + VERSION: ${{ env.INSO_VERSION }} + + - name: Create inso artifacts + run: USE_SYSTEM_FPM=true 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: diff --git a/.github/workflows/release-recurring.yml b/.github/workflows/release-recurring.yml index b8dd6c90c48..6a8956ae90e 100644 --- a/.github/workflows/release-recurring.yml +++ b/.github/workflows/release-recurring.yml @@ -15,6 +15,54 @@ 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: actions/checkout@v3 + name: Checkout branch + - 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 + npm install -g npm@latest + run: | + cd /app + npm config set -g user=`whoami` + npm install -g n + n `cat .nvmrc` + npm install + 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: + 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/')"