mirror of
https://github.com/bitwarden/browser
synced 2025-12-11 13:53:34 +00:00
[BRE-714] Enhance TestFlight desktop publishing (#13871)
* Update TestFlight deployment to use Fastlane for app uploads * Update TestFlight deployment to use Fastlane for app uploads * Fix * Fix create secret for fastlane * Fix create secret for fastlane * Fix create secret for fastlane * Install gsed to use sed on macos runner * Create test file * Fix test * Use actual token * Add TestFlight distribution option for QA testing * Update .github/workflows/build-desktop.yml Co-authored-by: MtnBurrit0 <77340197+mimartin12@users.noreply.github.com> * Add if to secret construction for fastlane --------- Co-authored-by: MtnBurrit0 <77340197+mimartin12@users.noreply.github.com>
This commit is contained in:
42
.github/workflows/build-desktop.yml
vendored
42
.github/workflows/build-desktop.yml
vendored
@@ -33,6 +33,10 @@ on:
|
|||||||
description: "Custom SDK branch"
|
description: "Custom SDK branch"
|
||||||
required: false
|
required: false
|
||||||
type: string
|
type: string
|
||||||
|
testflight_distribute:
|
||||||
|
description: "Force distribute to TestFlight regardless of branch (useful for QA testing on feature branches)"
|
||||||
|
type: boolean
|
||||||
|
default: true
|
||||||
|
|
||||||
defaults:
|
defaults:
|
||||||
run:
|
run:
|
||||||
@@ -1208,21 +1212,45 @@ jobs:
|
|||||||
path: apps/desktop/dist/mas-universal/Bitwarden-${{ env._PACKAGE_VERSION }}-universal.pkg
|
path: apps/desktop/dist/mas-universal/Bitwarden-${{ env._PACKAGE_VERSION }}-universal.pkg
|
||||||
if-no-files-found: error
|
if-no-files-found: error
|
||||||
|
|
||||||
|
- name: Create secrets for Fastlane
|
||||||
|
if: |
|
||||||
|
github.event_name != 'pull_request_target'
|
||||||
|
&& (inputs.testflight_distribute || github.ref == 'refs/heads/main' || github.ref == 'refs/heads/rc' || github.ref == 'refs/heads/hotfix-rc-desktop')
|
||||||
|
run: |
|
||||||
|
brew install gsed
|
||||||
|
|
||||||
|
KEY_WITHOUT_NEWLINES=$(gsed -E ':a;N;$!ba;s/\r{0,1}\n/\\n/g' ~/private_keys/AuthKey_6TV9MKN3GP.p8)
|
||||||
|
|
||||||
|
cat << EOF > ~/secrets/appstoreconnect-fastlane.json
|
||||||
|
{
|
||||||
|
"issuer_id": "${{ secrets.APP_STORE_CONNECT_TEAM_ISSUER }}",
|
||||||
|
"key_id": "6TV9MKN3GP",
|
||||||
|
"key": "$KEY_WITHOUT_NEWLINES"
|
||||||
|
}
|
||||||
|
EOF
|
||||||
|
|
||||||
- name: Deploy to TestFlight
|
- name: Deploy to TestFlight
|
||||||
id: testflight-deploy
|
id: testflight-deploy
|
||||||
if: |
|
if: |
|
||||||
github.event_name != 'pull_request_target'
|
github.event_name != 'pull_request_target'
|
||||||
&& (github.ref == 'refs/heads/main' || github.ref == 'refs/heads/rc' || github.ref == 'refs/heads/hotfix-rc-desktop')
|
&& (inputs.testflight_distribute || github.ref == 'refs/heads/main' || github.ref == 'refs/heads/rc' || github.ref == 'refs/heads/hotfix-rc-desktop')
|
||||||
env:
|
env:
|
||||||
APP_STORE_CONNECT_TEAM_ISSUER: ${{ secrets.APP_STORE_CONNECT_TEAM_ISSUER }}
|
APP_STORE_CONNECT_TEAM_ISSUER: ${{ secrets.APP_STORE_CONNECT_TEAM_ISSUER }}
|
||||||
APP_STORE_CONNECT_AUTH_KEY: 6TV9MKN3GP
|
APP_STORE_CONNECT_AUTH_KEY: 6TV9MKN3GP
|
||||||
|
BRANCH: ${{ github.ref }}
|
||||||
run: |
|
run: |
|
||||||
xcrun altool \
|
|
||||||
--upload-app \
|
GIT_CHANGE="$(git show -s --format=%s)"
|
||||||
--type macos \
|
|
||||||
--file "$(find ./dist/mas-universal/Bitwarden*.pkg)" \
|
BRANCH=$(echo $BRANCH | sed 's/refs\/heads\///')
|
||||||
--apiKey $APP_STORE_CONNECT_AUTH_KEY \
|
|
||||||
--apiIssuer $APP_STORE_CONNECT_TEAM_ISSUER
|
CHANGELOG="$BRANCH: $GIT_CHANGE"
|
||||||
|
|
||||||
|
fastlane pilot upload \
|
||||||
|
--app_identifier "com.bitwarden.desktop" \
|
||||||
|
--changelog "$CHANGELOG" \
|
||||||
|
--api_key_path $HOME/secrets/appstoreconnect-fastlane.json \
|
||||||
|
--pkg "$(find ./dist/mas-universal/Bitwarden*.pkg)"
|
||||||
|
|
||||||
- name: Post message to a Slack channel
|
- name: Post message to a Slack channel
|
||||||
id: slack-message
|
id: slack-message
|
||||||
|
|||||||
Reference in New Issue
Block a user