mirror of
https://github.com/bitwarden/browser
synced 2026-02-13 06:54:07 +00:00
Merge branch 'main' into ps/extension-refresh
This commit is contained in:
67
.github/workflows/build-desktop.yml
vendored
67
.github/workflows/build-desktop.yml
vendored
@@ -738,7 +738,7 @@ jobs:
|
||||
$package = Get-Content -Raw -Path electron-builder.json | ConvertFrom-Json
|
||||
$package | Add-Member -MemberType NoteProperty -Name buildVersion -Value "$env:BUILD_NUMBER"
|
||||
$package | ConvertTo-Json -Depth 32 | Set-Content -Path electron-builder.json
|
||||
"### MacOS GitHub build number: $env:BUILD_NUMBER" | Out-File -FilePath $env:GITHUB_STEP_SUMMARY -Append
|
||||
Write-Output "### MacOS GitHub build number: $env:BUILD_NUMBER"
|
||||
|
||||
- name: Install Node dependencies
|
||||
run: npm ci
|
||||
@@ -879,6 +879,13 @@ jobs:
|
||||
with:
|
||||
creds: ${{ secrets.AZURE_KV_CI_SERVICE_PRINCIPAL }}
|
||||
|
||||
- name: Retrieve Slack secret
|
||||
id: retrieve-slack-secret
|
||||
uses: bitwarden/gh-actions/get-keyvault-secrets@main
|
||||
with:
|
||||
keyvault: bitwarden-ci
|
||||
secrets: "slack-bot-token"
|
||||
|
||||
- name: Download Provisioning Profiles secrets
|
||||
env:
|
||||
ACCOUNT_NAME: bitwardenci
|
||||
@@ -955,7 +962,7 @@ jobs:
|
||||
$package = Get-Content -Raw -Path electron-builder.json | ConvertFrom-Json
|
||||
$package | Add-Member -MemberType NoteProperty -Name buildVersion -Value "$env:BUILD_NUMBER"
|
||||
$package | ConvertTo-Json -Depth 32 | Set-Content -Path electron-builder.json
|
||||
"### MacOS App Store build number: $env:BUILD_NUMBER" | Out-File -FilePath $env:GITHUB_STEP_SUMMARY -Append
|
||||
Write-Output "### MacOS App Store build number: $env:BUILD_NUMBER"
|
||||
|
||||
- name: Install Node dependencies
|
||||
run: npm ci
|
||||
@@ -1016,16 +1023,60 @@ jobs:
|
||||
if-no-files-found: error
|
||||
|
||||
- name: Deploy to TestFlight
|
||||
id: testflight-deploy
|
||||
if: |
|
||||
(github.ref == 'refs/heads/main'
|
||||
&& needs.setup.outputs.rc_branch_exists == 0
|
||||
&& needs.setup.outputs.hotfix_branch_exists == 0)
|
||||
|| (github.ref == 'refs/heads/rc' && needs.setup.outputs.hotfix_branch_exists == 0)
|
||||
|| github.ref == 'refs/heads/hotfix-rc-desktop'
|
||||
|| github.ref == 'refs/heads/rc'
|
||||
|| github.ref == 'refs/heads/hotfix-rc-desktop')
|
||||
env:
|
||||
APP_STORE_CONNECT_TEAM_ISSUER: ${{ secrets.APP_STORE_CONNECT_TEAM_ISSUER }}
|
||||
APP_STORE_CONNECT_AUTH_KEY: 6TV9MKN3GP
|
||||
run: npm run upload:mas
|
||||
run: |
|
||||
xcrun altool \
|
||||
--upload-app \
|
||||
--type macos \
|
||||
--file "$(find ./dist/mas-universal/Bitwarden*.pkg)" \
|
||||
--apiKey $APP_STORE_CONNECT_AUTH_KEY \
|
||||
--apiIssuer $APP_STORE_CONNECT_TEAM_ISSUER \
|
||||
&> output.txt
|
||||
|
||||
UUID=$(cat output.txt | grep "Delivery UUID" | sed -E 's/Delivery UUID: (.*)/\1/')
|
||||
echo "uuid=$UUID" >> $GITHUB_OUTPUT
|
||||
|
||||
- name: Post message to a Slack channel
|
||||
id: slack-message
|
||||
if: |
|
||||
(github.ref == 'refs/heads/main'
|
||||
|| github.ref == 'refs/heads/rc'
|
||||
|| github.ref == 'refs/heads/hotfix-rc-desktop')
|
||||
uses: slackapi/slack-github-action@6c661ce58804a1a20f6dc5fbee7f0381b469e001 # v1.25.0
|
||||
with:
|
||||
channel-id: C074F5UESQ0
|
||||
payload: |
|
||||
{
|
||||
"blocks": [
|
||||
{
|
||||
"type": "section",
|
||||
"text": {
|
||||
"type": "mrkdwn",
|
||||
"text": "Desktop client v${{ env._PACKAGE_VERSION }} <${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}|build> success on *${{ github.ref_name }}*"
|
||||
},
|
||||
"accessory": {
|
||||
"type": "button",
|
||||
"text": {
|
||||
"type": "plain_text",
|
||||
"text": "TestFlight Build",
|
||||
"emoji": true
|
||||
},
|
||||
"url": "https://appstoreconnect.apple.com/teams/${{ env.APP_STORE_CONNECT_TEAM_ISSUER }}/apps/1352778147/testflight/macos/${{ env.BUILD_UUID }}"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
env:
|
||||
APP_STORE_CONNECT_TEAM_ISSUER: ${{ secrets.APP_STORE_CONNECT_TEAM_ISSUER }}
|
||||
SLACK_BOT_TOKEN: ${{ steps.retrieve-slack-secret.outputs.slack-bot-token }}
|
||||
BUILD_UUID: ${{ steps.testflight-deploy.outputs.uuid }}
|
||||
|
||||
|
||||
macos-package-dev:
|
||||
@@ -1158,7 +1209,7 @@ jobs:
|
||||
$package = Get-Content -Raw -Path electron-builder.json | ConvertFrom-Json
|
||||
$package | Add-Member -MemberType NoteProperty -Name buildVersion -Value "$env:BUILD_NUMBER"
|
||||
$package | ConvertTo-Json -Depth 32 | Set-Content -Path electron-builder.json
|
||||
"### MacOS Dev build number: $env:BUILD_NUMBER" | Out-File -FilePath $env:GITHUB_STEP_SUMMARY -Append
|
||||
Write-Output "### MacOS Dev build number: $env:BUILD_NUMBER"
|
||||
|
||||
- name: Install Node dependencies
|
||||
run: npm ci
|
||||
|
||||
15
.github/workflows/version-bump.yml
vendored
15
.github/workflows/version-bump.yml
vendored
@@ -83,8 +83,7 @@ jobs:
|
||||
with:
|
||||
keyvault: "bitwarden-ci"
|
||||
secrets: "github-gpg-private-key,
|
||||
github-gpg-private-key-passphrase,
|
||||
github-pat-bitwarden-devops-bot-repo-scope"
|
||||
github-gpg-private-key-passphrase"
|
||||
|
||||
- name: Import GPG key
|
||||
uses: crazy-max/ghaction-import-gpg@01dd5d3ca463c7f10f7f4f7b4f177225ac661ee4 # v6.1.0
|
||||
@@ -447,11 +446,19 @@ jobs:
|
||||
echo "$MESSAGE" >> $GITHUB_ENV
|
||||
echo "EOF" >> $GITHUB_ENV
|
||||
|
||||
- name: Generate GH App token
|
||||
uses: actions/create-github-app-token@3378cda945da322a8db4b193e19d46352ebe2de5 # v1.10.4
|
||||
id: app-token
|
||||
with:
|
||||
app-id: ${{ secrets.BW_GHAPP_ID }}
|
||||
private-key: ${{ secrets.BW_GHAPP_KEY }}
|
||||
owner: ${{ github.repository_owner }}
|
||||
|
||||
- name: Create Version PR
|
||||
if: ${{ steps.version-changed.outputs.changes_to_commit == 'TRUE' }}
|
||||
id: create-pr
|
||||
env:
|
||||
GH_TOKEN: ${{ steps.retrieve-secrets.outputs.github-pat-bitwarden-devops-bot-repo-scope }}
|
||||
GH_TOKEN: ${{ steps.app-token.outputs.token }}
|
||||
PR_BRANCH: ${{ steps.create-branch.outputs.name }}
|
||||
TITLE: "Bump client(s) version"
|
||||
run: |
|
||||
@@ -483,7 +490,7 @@ jobs:
|
||||
- name: Merge PR
|
||||
if: ${{ steps.version-changed.outputs.changes_to_commit == 'TRUE' }}
|
||||
env:
|
||||
GH_TOKEN: ${{ steps.retrieve-secrets.outputs.github-pat-bitwarden-devops-bot-repo-scope }}
|
||||
GH_TOKEN: ${{ steps.app-token.outputs.token }}
|
||||
PR_NUMBER: ${{ steps.create-pr.outputs.pr_number }}
|
||||
run: gh pr merge $PR_NUMBER --squash --auto --delete-branch
|
||||
|
||||
|
||||
Reference in New Issue
Block a user