1
0
mirror of https://github.com/bitwarden/browser synced 2026-02-09 05:00:10 +00:00

Making an example for dev_mode

This commit is contained in:
Andy Pixley
2025-12-15 20:29:03 -05:00
parent 97778d70a7
commit 807b531853

View File

@@ -83,6 +83,7 @@ jobs:
hotfix_branch_exists: ${{ steps.branch-check.outputs.hotfix_branch_exists }}
node_version: ${{ steps.retrieve-node-version.outputs.node_version }}
has_secrets: ${{ steps.check-secrets.outputs.has_secrets }}
dev_mode: ${{ steps.check-dev-mode.outputs.dev_mode }}
defaults:
run:
working-directory: apps/desktop
@@ -155,6 +156,28 @@ jobs:
has_secrets=${{ secrets.AZURE_CLIENT_ID != '' }}
echo "has_secrets=$has_secrets" >> "$GITHUB_OUTPUT"
- name: Check dev mode
id: check-dev-mode
run: |
EVENT_NAME="${GITHUB_EVENT_NAME}"
REF="${GITHUB_REF}"
DEV_MODE=true
if [[ "$EVENT_NAME" == "push" ]]; then
BRANCH="${REF#refs/heads/}"
case "$BRANCH" in
main|rc|hotfix-rc-desktop)
DEV_MODE=false
;;
*)
DEV_MODE=true
;;
esac
fi
echo "dev_mode=$DEV_MODE" >> "$GITHUB_OUTPUT"
echo "dev_mode set to $DEV_MODE (event=$EVENT_NAME ref=$REF)"
linux:
name: Linux Build
# Note, before updating the ubuntu version of the workflow, ensure the snap base image
@@ -589,7 +612,7 @@ jobs:
- name: Build
env:
BUILD_MODE: ${{ github.event_name == 'workflow_call' && 'build' || 'build:dev' }}
BUILD_MODE: ${{ needs.setup.outputs.dev_mode == 'true' && 'build:dev' || 'build' }}
run: npm run "$env:BUILD_MODE"
- name: Pack
@@ -856,7 +879,7 @@ jobs:
- name: Build
env:
BUILD_MODE: ${{ github.event_name == 'workflow_call' && 'build' || 'build:dev' }}
BUILD_MODE: ${{ needs.setup.outputs.dev_mode == 'true' && 'build:dev' || 'build' }}
run: npm run "$env:BUILD_MODE"
- name: Pack
@@ -1216,7 +1239,7 @@ jobs:
- name: Build application (dev)
env:
BUILD_MODE: ${{ github.event_name == 'workflow_call' && 'build' || 'build:dev' }}
BUILD_MODE: ${{ needs.setup.outputs.dev_mode == 'true' && 'build:dev' || 'build' }}
run: npm run "$BUILD_MODE"
browser-build:
@@ -1443,7 +1466,7 @@ jobs:
- name: Build
if: steps.build-cache.outputs.cache-hit != 'true'
env:
BUILD_MODE: ${{ github.event_name == 'workflow_call' && 'build' || 'build:dev' }}
BUILD_MODE: ${{ needs.setup.outputs.dev_mode == 'true' && 'build:dev' || 'build' }}
run: npm run "$BUILD_MODE"
- name: Download Browser artifact
@@ -1728,7 +1751,7 @@ jobs:
- name: Build
if: steps.build-cache.outputs.cache-hit != 'true'
env:
BUILD_MODE: ${{ github.event_name == 'workflow_call' && 'build' || 'build:dev' }}
BUILD_MODE: ${{ needs.setup.outputs.dev_mode == 'true' && 'build:dev' || 'build' }}
run: npm run "$BUILD_MODE"
- name: Download Browser artifact