Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 3 additions & 4 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,9 @@ on:
type: choice
options:
- all
- macos:x64
- macos:arm64
- linux:x64
- windows:x64
- macos:all (amd64, arm64)
- linux:all (amd64, arm64)
- windows:all (amd64)

environment:
description: Environment to run build
Expand Down
34 changes: 25 additions & 9 deletions .github/workflows/pipeline-build-linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,9 +47,6 @@ jobs:
- name: Install dependencies for root package.js
run: yarn install --frozen-lockfile

- name: Download backend
uses: ./.github/actions/download-backend

- name: Configure Environment Variables
run: |
{
Expand All @@ -66,27 +63,46 @@ jobs:
echo "RI_APP_TYPE=${{ env.RI_APP_TYPE }}"
} >> "${{ env.envFile }}"

- name: Build linux package (production)
- name: Download backend x64
uses: ./.github/actions/download-backend

- name: Build linux package x64 (production)
if: inputs.environment == 'production'
run: |
yarn package:prod --target linux-x64 --out ${packagePath}-x64.vsix

- name: Build linux package x64 (staging)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: I would put staging before production, although I see they're conditional and independent from each other. Also, I see that the rest of the files follow the same convention and you simply synced this one to look like the rest, so let's disregard this comment.

if: inputs.environment == 'staging'
run: |
sed -i "s/^RI_APP_FOLDER_NAME=.*/RI_APP_FOLDER_NAME='.redis-for-vscode-stage'/" ${{ env.envFile }}
yarn package:stage --target linux-x64 --out ${packagePath}-x64.vsix

- name: Download backend arm64
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a general note, and I don't think it's slow right now as well, but we can parallelize the ARM and AMD builds, because they are independent (correct me if I'm wrong).

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

some space for improvements for the future

uses: ./.github/actions/download-backend
with:
arch: arm64

- name: Build linux package arm64 (production)
if: inputs.environment == 'production'
run: |
yarn package:prod --target linux-x64 --out ${packagePath}
yarn package:prod --target linux-arm64 --out ${packagePath}-arm64.vsix

- name: Build linux package (staging)
- name: Build linux package arm64 (staging)
if: inputs.environment == 'staging'
run: |
sed -i "s/^RI_APP_FOLDER_NAME=.*/RI_APP_FOLDER_NAME='.redis-for-vscode-stage'/" ${{ env.envFile }}
yarn package:stage --target linux-x64 --out ${packagePath}
yarn package:stage --target linux-arm64 --out ${packagePath}-arm64.vsix

- uses: actions/upload-artifact@v4
name: Upload extension artifact
with:
name: linux-build
name: linux-builds
path: |
release/redis-for-*.vsix

env:
envFile: '.env'
packagePath: './release/redis-for-vscode-extension-linux-x64.vsix'
packagePath: './release/redis-for-vscode-extension-linux'
RI_SEGMENT_WRITE_KEY: ${{ secrets.RI_SEGMENT_WRITE_KEY }}
RI_CLOUD_IDP_AUTHORIZE_URL: ${{ secrets.RI_CLOUD_IDP_AUTHORIZE_URL }}
RI_CLOUD_IDP_TOKEN_URL: ${{ secrets.RI_CLOUD_IDP_TOKEN_URL }}
Expand Down
Loading