Skip to content

CI - Authenticator #145

CI - Authenticator

CI - Authenticator #145

Workflow file for this run

name: CI / Authenticator
run-name: ${{ github.event_name == 'workflow_dispatch' && inputs.build-mode != 'CI' && format('Manual - Authenticator ({0}) {1}', inputs.build-mode, inputs.xcode-version) || 'CI - Authenticator' }}
on:
push:
branches:
- main
- release/**/*
paths-ignore:
- Bitwarden/**
- BitwardenActionExtension/**
- BitwardenAutoFillExtension/**
- BitwardenShared/**
- BitwardenShareExtension/**
- BitwardenWatchApp/**
- BitwardenWatchWidgetExtension/**
workflow_dispatch:
inputs:
build-mode:
description: "Build Mode"
required: true
default: "Device"
type: choice
options:
- Device
- Simulator
- CI
version-name:
description: "Version Name Override - e.g. '2024.8.1'"
type: string
version-number:
description: "Version Number Override - e.g. '1021'"
type: string
compiler-flags:
description: "Compiler Flags - e.g. 'DEBUG_MENU FEATURE2'"
type: string
patch_version:
description: "Order 999 - Overrides Patch version"
type: boolean
distribute:
description: "Distribute to TestFlight"
type: boolean
default: true
xcode-version:
description: "Xcode Version Override - e.g. '15.2'"
type: string
permissions:
contents: read
id-token: write
jobs:
version:
name: Calculate Version Name and Number
uses: bitwarden/ios/.github/workflows/_version.yml@main
with:
base_version_number: 30
version_name: ${{ inputs.version-name }}
version_number: ${{ inputs.version-number }}
patch_version: ${{ inputs.patch_version && '999' || '' }}
secrets: inherit
build-manual:
name: Build Manual - ${{ inputs.build-mode }}
needs: version
if: ${{ github.event_name == 'workflow_dispatch' && inputs.build-mode != 'CI' }}
uses: bitwarden/ios/.github/workflows/_build-any.yml@main
with:
bw-env: bwa_prod
build-mode: ${{ inputs.build-mode }}
version-name: ${{ needs.version.outputs.version_name }}
version-number: ${{ needs.version.outputs.version_number }} #TODO: refactor all inputs to be consistent with - or _
xcode-version: ${{ inputs.xcode-version }}
compiler-flags: ${{ inputs.compiler-flags }}
distribute: ${{ github.event_name == 'workflow_dispatch' && inputs.distribute }} # event_name check is a workaround for github failing the workflow run when triggered by push
secrets: inherit
build-public:
name: Build CI
needs: version
if: ${{ github.event_name == 'push' || inputs.build-mode == 'CI' }}
uses: bitwarden/ios/.github/workflows/_build-any.yml@main
strategy:
matrix:
include:
- bw-env: bwa_prod
build-mode: Device
distribute: true
- bw-env: bwa_prod
build-mode: Simulator
distribute: false
with:
bw-env: ${{ matrix.bw-env }}
build-mode: ${{ matrix.build-mode }}
version-name: ${{ needs.version.outputs.version_name }}
version-number: ${{ needs.version.outputs.version_number }}
distribute: ${{ matrix.distribute }}
secrets: inherit