2022-07-21 17:16:41 +02:00
|
|
|
name: Release Desktop Beta
|
|
|
|
|
|
|
|
on:
|
|
|
|
workflow_dispatch:
|
|
|
|
inputs:
|
|
|
|
version_number:
|
|
|
|
description: "New Beta Version"
|
|
|
|
required: true
|
|
|
|
|
|
|
|
defaults:
|
|
|
|
run:
|
|
|
|
shell: bash
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
setup:
|
|
|
|
name: Setup
|
2024-02-08 21:56:39 +01:00
|
|
|
runs-on: ubuntu-22.04
|
2022-07-21 17:16:41 +02:00
|
|
|
outputs:
|
|
|
|
release-version: ${{ steps.version.outputs.version }}
|
|
|
|
release-channel: ${{ steps.release-channel.outputs.channel }}
|
2022-07-30 00:35:47 +02:00
|
|
|
branch-name: ${{ steps.branch.outputs.branch-name }}
|
2022-08-08 19:21:49 +02:00
|
|
|
build_number: ${{ steps.increment-version.outputs.build_number }}
|
2023-10-04 18:23:40 +02:00
|
|
|
node_version: ${{ steps.retrieve-node-version.outputs.node_version }}
|
2022-07-21 17:16:41 +02:00
|
|
|
steps:
|
|
|
|
- name: Checkout repo
|
2024-10-17 16:45:49 +02:00
|
|
|
uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4.2.1
|
2022-07-21 17:16:41 +02:00
|
|
|
|
2022-07-30 00:35:47 +02:00
|
|
|
- name: Branch check
|
|
|
|
run: |
|
2023-12-12 20:57:50 +01:00
|
|
|
if [[ "$GITHUB_REF" != "refs/heads/main" ]] && [[ "$GITHUB_REF" != "refs/heads/rc" ]] && [[ "$GITHUB_REF" != "refs/heads/hotfix-rc" ]]; then
|
2022-07-30 00:35:47 +02:00
|
|
|
echo "==================================="
|
2023-12-12 20:57:50 +01:00
|
|
|
echo "[!] Can only release from the 'main', 'rc' or 'hotfix-rc' branches"
|
2022-07-30 00:35:47 +02:00
|
|
|
echo "==================================="
|
|
|
|
exit 1
|
|
|
|
fi
|
2022-07-21 17:16:41 +02:00
|
|
|
|
|
|
|
- name: Bump Desktop Version - Root
|
|
|
|
env:
|
|
|
|
VERSION: ${{ github.event.inputs.version_number }}
|
|
|
|
run: npm version --workspace=@bitwarden/desktop ${VERSION}-beta
|
|
|
|
|
|
|
|
- name: Bump Desktop Version - App
|
|
|
|
env:
|
|
|
|
VERSION: ${{ github.event.inputs.version_number }}
|
|
|
|
run: npm version ${VERSION}-beta
|
|
|
|
working-directory: "apps/desktop/src"
|
|
|
|
|
|
|
|
- name: Check Release Version
|
|
|
|
id: version
|
2023-11-08 19:08:34 +01:00
|
|
|
uses: bitwarden/gh-actions/release-version-check@main
|
2022-07-21 17:16:41 +02:00
|
|
|
with:
|
2022-08-08 19:21:49 +02:00
|
|
|
release-type: 'Initial Release'
|
2022-07-21 17:16:41 +02:00
|
|
|
project-type: ts
|
|
|
|
file: apps/desktop/src/package.json
|
|
|
|
monorepo: true
|
|
|
|
monorepo-project: desktop
|
|
|
|
|
2022-08-08 19:21:49 +02:00
|
|
|
- name: Increment Version
|
|
|
|
id: increment-version
|
|
|
|
run: |
|
|
|
|
BUILD_NUMBER=$(expr 3000 + $GITHUB_RUN_NUMBER)
|
|
|
|
echo "Setting build number to $BUILD_NUMBER"
|
2022-12-05 16:04:04 +01:00
|
|
|
echo "build_number=$BUILD_NUMBER" >> $GITHUB_OUTPUT
|
2022-08-08 19:21:49 +02:00
|
|
|
|
2022-07-21 17:16:41 +02:00
|
|
|
- name: Get Version Channel
|
|
|
|
id: release-channel
|
|
|
|
run: |
|
|
|
|
case "${{ steps.version.outputs.version }}" in
|
|
|
|
*"alpha"*)
|
2022-12-05 16:04:04 +01:00
|
|
|
echo "channel=alpha" >> $GITHUB_OUTPUT
|
2022-07-21 17:16:41 +02:00
|
|
|
echo "[!] We do not yet support 'alpha'"
|
|
|
|
exit 1
|
|
|
|
;;
|
|
|
|
*"beta"*)
|
2022-12-05 16:04:04 +01:00
|
|
|
echo "channel=beta" >> $GITHUB_OUTPUT
|
2022-07-21 17:16:41 +02:00
|
|
|
;;
|
|
|
|
*)
|
2022-12-05 16:04:04 +01:00
|
|
|
echo "channel=latest" >> $GITHUB_OUTPUT
|
2022-07-21 17:16:41 +02:00
|
|
|
;;
|
|
|
|
esac
|
|
|
|
|
2022-07-30 00:35:47 +02:00
|
|
|
- name: Setup git config
|
|
|
|
run: |
|
|
|
|
git config --global user.name "GitHub Action Bot"
|
|
|
|
git config --global user.email "41898282+github-actions[bot]@users.noreply.github.com"
|
|
|
|
git config --global url."https://github.com/".insteadOf ssh://git@github.com/
|
|
|
|
git config --global url."https://".insteadOf ssh://
|
|
|
|
|
|
|
|
- name: Create desktop-beta-release branch
|
|
|
|
id: branch
|
|
|
|
env:
|
|
|
|
VERSION: ${{ github.event.inputs.version_number }}
|
|
|
|
run: |
|
|
|
|
find="."
|
|
|
|
replace="_"
|
|
|
|
ver=${VERSION//$find/$replace}
|
|
|
|
branch_name=desktop-beta-release-$ver-beta
|
|
|
|
|
|
|
|
git switch -c $branch_name
|
|
|
|
git add .
|
|
|
|
git commit -m "Bump desktop version to $VERSION-beta"
|
|
|
|
|
|
|
|
git push -u origin $branch_name
|
|
|
|
|
2022-12-05 16:04:04 +01:00
|
|
|
echo "branch-name=$branch_name" >> $GITHUB_OUTPUT
|
2022-07-30 00:35:47 +02:00
|
|
|
|
2023-10-04 18:23:40 +02:00
|
|
|
- name: Get Node Version
|
|
|
|
id: retrieve-node-version
|
|
|
|
run: |
|
|
|
|
NODE_NVMRC=$(cat .nvmrc)
|
|
|
|
NODE_VERSION=${NODE_NVMRC/v/''}
|
|
|
|
echo "node_version=$NODE_VERSION" >> $GITHUB_OUTPUT
|
|
|
|
|
2022-07-21 17:16:41 +02:00
|
|
|
linux:
|
|
|
|
name: Linux Build
|
2024-02-08 21:56:39 +01:00
|
|
|
runs-on: ubuntu-22.04
|
2022-07-21 17:16:41 +02:00
|
|
|
needs: setup
|
|
|
|
env:
|
2022-07-30 00:35:47 +02:00
|
|
|
_PACKAGE_VERSION: ${{ needs.setup.outputs.release-version }}
|
2023-10-04 18:23:40 +02:00
|
|
|
_NODE_VERSION: ${{ needs.setup.outputs.node_version }}
|
2023-12-21 11:14:13 +01:00
|
|
|
NODE_OPTIONS: --max_old_space_size=4096
|
2022-07-21 17:16:41 +02:00
|
|
|
defaults:
|
|
|
|
run:
|
|
|
|
working-directory: apps/desktop
|
|
|
|
steps:
|
|
|
|
- name: Checkout repo
|
2024-10-17 16:45:49 +02:00
|
|
|
uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4.2.1
|
2022-07-30 00:35:47 +02:00
|
|
|
with:
|
|
|
|
ref: ${{ needs.setup.outputs.branch-name }}
|
2022-07-21 17:16:41 +02:00
|
|
|
|
|
|
|
- name: Set up Node
|
2024-09-24 17:35:01 +02:00
|
|
|
uses: actions/setup-node@0a44ba7841725637a19e28fa30b79a866c81b0a6 # v4.0.4
|
2022-07-21 17:16:41 +02:00
|
|
|
with:
|
|
|
|
cache: 'npm'
|
|
|
|
cache-dependency-path: '**/package-lock.json'
|
2023-10-04 18:23:40 +02:00
|
|
|
node-version: ${{ env._NODE_VERSION }}
|
2022-07-21 17:16:41 +02:00
|
|
|
|
|
|
|
- name: Set up environment
|
|
|
|
run: |
|
|
|
|
sudo apt-get update
|
|
|
|
sudo apt-get -y install pkg-config libxss-dev libsecret-1-dev rpm
|
|
|
|
|
|
|
|
- name: Set up Snap
|
|
|
|
run: sudo snap install snapcraft --classic
|
|
|
|
|
|
|
|
- name: Print environment
|
|
|
|
run: |
|
|
|
|
node --version
|
|
|
|
npm --version
|
|
|
|
snap --version
|
|
|
|
snapcraft --version || echo 'snapcraft unavailable'
|
|
|
|
|
|
|
|
- name: Install Node dependencies
|
|
|
|
run: npm ci
|
|
|
|
working-directory: ./
|
|
|
|
|
|
|
|
- name: Build application
|
|
|
|
run: npm run dist:lin
|
|
|
|
|
|
|
|
- name: Upload .deb artifact
|
2024-10-17 16:45:49 +02:00
|
|
|
uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # v4.4.3
|
2022-07-21 17:16:41 +02:00
|
|
|
with:
|
|
|
|
name: Bitwarden-${{ env._PACKAGE_VERSION }}-amd64.deb
|
|
|
|
path: apps/desktop/dist/Bitwarden-${{ env._PACKAGE_VERSION }}-amd64.deb
|
|
|
|
if-no-files-found: error
|
|
|
|
|
|
|
|
- name: Upload .rpm artifact
|
2024-10-17 16:45:49 +02:00
|
|
|
uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # v4.4.3
|
2022-07-21 17:16:41 +02:00
|
|
|
with:
|
|
|
|
name: Bitwarden-${{ env._PACKAGE_VERSION }}-x86_64.rpm
|
|
|
|
path: apps/desktop/dist/Bitwarden-${{ env._PACKAGE_VERSION }}-x86_64.rpm
|
|
|
|
if-no-files-found: error
|
|
|
|
|
|
|
|
- name: Upload .freebsd artifact
|
2024-10-17 16:45:49 +02:00
|
|
|
uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # v4.4.3
|
2022-07-21 17:16:41 +02:00
|
|
|
with:
|
|
|
|
name: Bitwarden-${{ env._PACKAGE_VERSION }}-x64.freebsd
|
|
|
|
path: apps/desktop/dist/Bitwarden-${{ env._PACKAGE_VERSION }}-x64.freebsd
|
|
|
|
if-no-files-found: error
|
|
|
|
|
|
|
|
- name: Upload .snap artifact
|
2024-10-17 16:45:49 +02:00
|
|
|
uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # v4.4.3
|
2022-07-21 17:16:41 +02:00
|
|
|
with:
|
|
|
|
name: bitwarden_${{ env._PACKAGE_VERSION }}_amd64.snap
|
|
|
|
path: apps/desktop/dist/bitwarden_${{ env._PACKAGE_VERSION }}_amd64.snap
|
|
|
|
if-no-files-found: error
|
|
|
|
|
|
|
|
- name: Upload .AppImage artifact
|
2024-10-17 16:45:49 +02:00
|
|
|
uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # v4.4.3
|
2022-07-21 17:16:41 +02:00
|
|
|
with:
|
|
|
|
name: Bitwarden-${{ env._PACKAGE_VERSION }}-x86_64.AppImage
|
|
|
|
path: apps/desktop/dist/Bitwarden-${{ env._PACKAGE_VERSION }}-x86_64.AppImage
|
|
|
|
if-no-files-found: error
|
|
|
|
|
|
|
|
- name: Upload auto-update artifact
|
2024-10-17 16:45:49 +02:00
|
|
|
uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # v4.4.3
|
2022-07-21 17:16:41 +02:00
|
|
|
with:
|
2022-07-30 00:35:47 +02:00
|
|
|
name: ${{ needs.setup.outputs.release-channel }}-linux.yml
|
|
|
|
path: apps/desktop/dist/${{ needs.setup.outputs.release-channel }}-linux.yml
|
2022-07-21 17:16:41 +02:00
|
|
|
if-no-files-found: error
|
|
|
|
|
|
|
|
|
|
|
|
windows:
|
|
|
|
name: Windows Build
|
2024-02-08 21:33:19 +01:00
|
|
|
runs-on: windows-2022
|
2022-07-21 17:16:41 +02:00
|
|
|
needs: setup
|
|
|
|
defaults:
|
|
|
|
run:
|
|
|
|
shell: pwsh
|
|
|
|
working-directory: apps/desktop
|
|
|
|
env:
|
2022-07-30 00:35:47 +02:00
|
|
|
_PACKAGE_VERSION: ${{ needs.setup.outputs.release-version }}
|
2023-10-04 18:23:40 +02:00
|
|
|
_NODE_VERSION: ${{ needs.setup.outputs.node_version }}
|
2023-12-21 11:14:13 +01:00
|
|
|
NODE_OPTIONS: --max_old_space_size=4096
|
2022-07-21 17:16:41 +02:00
|
|
|
steps:
|
|
|
|
- name: Checkout repo
|
2024-10-17 16:45:49 +02:00
|
|
|
uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4.2.1
|
2022-07-30 00:35:47 +02:00
|
|
|
with:
|
|
|
|
ref: ${{ needs.setup.outputs.branch-name }}
|
2022-07-21 17:16:41 +02:00
|
|
|
|
|
|
|
- name: Set up Node
|
2024-09-24 17:35:01 +02:00
|
|
|
uses: actions/setup-node@0a44ba7841725637a19e28fa30b79a866c81b0a6 # v4.0.4
|
2022-07-21 17:16:41 +02:00
|
|
|
with:
|
|
|
|
cache: 'npm'
|
|
|
|
cache-dependency-path: '**/package-lock.json'
|
2023-10-04 18:23:40 +02:00
|
|
|
node-version: ${{ env._NODE_VERSION }}
|
2022-07-21 17:16:41 +02:00
|
|
|
|
|
|
|
- name: Install AST
|
2023-11-21 23:21:56 +01:00
|
|
|
run: dotnet tool install --global AzureSignTool --version 4.0.1
|
2022-07-21 17:16:41 +02:00
|
|
|
|
|
|
|
- name: Set up environment
|
|
|
|
run: choco install checksum --no-progress
|
|
|
|
|
|
|
|
- name: Print environment
|
|
|
|
run: |
|
|
|
|
node --version
|
|
|
|
npm --version
|
|
|
|
choco --version
|
|
|
|
|
|
|
|
- name: Login to Azure
|
2024-02-08 20:38:19 +01:00
|
|
|
uses: Azure/login@e15b166166a8746d1a47596803bd8c1b595455cf # v1.6.0
|
2022-07-21 17:16:41 +02:00
|
|
|
with:
|
2023-04-11 18:37:58 +02:00
|
|
|
creds: ${{ secrets.AZURE_KV_CI_SERVICE_PRINCIPAL }}
|
2022-07-21 17:16:41 +02:00
|
|
|
|
|
|
|
- name: Retrieve secrets
|
|
|
|
id: retrieve-secrets
|
2023-11-08 19:08:34 +01:00
|
|
|
uses: bitwarden/gh-actions/get-keyvault-secrets@main
|
2022-10-13 21:38:47 +02:00
|
|
|
with:
|
2023-04-11 18:37:58 +02:00
|
|
|
keyvault: "bitwarden-ci"
|
2022-10-13 21:38:47 +02:00
|
|
|
secrets: "code-signing-vault-url,
|
2022-09-05 11:39:27 +02:00
|
|
|
code-signing-client-id,
|
|
|
|
code-signing-tenant-id,
|
|
|
|
code-signing-client-secret,
|
2022-10-13 21:38:47 +02:00
|
|
|
code-signing-cert-name"
|
2022-07-21 17:16:41 +02:00
|
|
|
|
|
|
|
- name: Install Node dependencies
|
|
|
|
run: npm ci
|
|
|
|
working-directory: ./
|
|
|
|
|
|
|
|
- name: Build & Sign (dev)
|
|
|
|
env:
|
|
|
|
ELECTRON_BUILDER_SIGN: 1
|
|
|
|
SIGNING_VAULT_URL: ${{ steps.retrieve-secrets.outputs.code-signing-vault-url }}
|
|
|
|
SIGNING_CLIENT_ID: ${{ steps.retrieve-secrets.outputs.code-signing-client-id }}
|
|
|
|
SIGNING_TENANT_ID: ${{ steps.retrieve-secrets.outputs.code-signing-tenant-id }}
|
|
|
|
SIGNING_CLIENT_SECRET: ${{ steps.retrieve-secrets.outputs.code-signing-client-secret }}
|
|
|
|
SIGNING_CERT_NAME: ${{ steps.retrieve-secrets.outputs.code-signing-cert-name }}
|
|
|
|
run: |
|
|
|
|
npm run build
|
|
|
|
npm run pack:win
|
|
|
|
|
|
|
|
- name: Rename appx files for store
|
|
|
|
run: |
|
|
|
|
Copy-Item "./dist/Bitwarden-${{ env._PACKAGE_VERSION }}-ia32.appx" `
|
|
|
|
-Destination "./dist/Bitwarden-${{ env._PACKAGE_VERSION }}-ia32-store.appx"
|
|
|
|
Copy-Item "./dist/Bitwarden-${{ env._PACKAGE_VERSION }}-x64.appx" `
|
|
|
|
-Destination "./dist/Bitwarden-${{ env._PACKAGE_VERSION }}-x64-store.appx"
|
|
|
|
Copy-Item "./dist/Bitwarden-${{ env._PACKAGE_VERSION }}-arm64.appx" `
|
|
|
|
-Destination "./dist/Bitwarden-${{ env._PACKAGE_VERSION }}-arm64-store.appx"
|
|
|
|
|
|
|
|
- name: Package for Chocolatey
|
|
|
|
run: |
|
|
|
|
Copy-Item -Path ./stores/chocolatey -Destination ./dist/chocolatey -Recurse
|
|
|
|
Copy-Item -Path ./dist/nsis-web/Bitwarden-Installer-${{ env._PACKAGE_VERSION }}.exe `
|
|
|
|
-Destination ./dist/chocolatey
|
|
|
|
|
|
|
|
$checksum = checksum -t sha256 ./dist/chocolatey/Bitwarden-Installer-${{ env._PACKAGE_VERSION }}.exe
|
|
|
|
$chocoInstall = "./dist/chocolatey/tools/chocolateyinstall.ps1"
|
|
|
|
(Get-Content $chocoInstall).replace('__version__', "$env:_PACKAGE_VERSION").replace('__checksum__', $checksum) | Set-Content $chocoInstall
|
|
|
|
choco pack ./dist/chocolatey/bitwarden.nuspec --version "$env:_PACKAGE_VERSION" --out ./dist/chocolatey
|
|
|
|
|
|
|
|
- name: Fix NSIS artifact names for auto-updater
|
|
|
|
run: |
|
|
|
|
Rename-Item -Path .\dist\nsis-web\Bitwarden-${{ env._PACKAGE_VERSION }}-ia32.nsis.7z `
|
|
|
|
-NewName bitwarden-${{ env._PACKAGE_VERSION }}-ia32.nsis.7z
|
|
|
|
Rename-Item -Path .\dist\nsis-web\Bitwarden-${{ env._PACKAGE_VERSION }}-x64.nsis.7z `
|
|
|
|
-NewName bitwarden-${{ env._PACKAGE_VERSION }}-x64.nsis.7z
|
|
|
|
Rename-Item -Path .\dist\nsis-web\Bitwarden-${{ env._PACKAGE_VERSION }}-arm64.nsis.7z `
|
|
|
|
-NewName bitwarden-${{ env._PACKAGE_VERSION }}-arm64.nsis.7z
|
|
|
|
|
|
|
|
- name: Upload portable exe artifact
|
2024-10-17 16:45:49 +02:00
|
|
|
uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # v4.4.3
|
2022-07-21 17:16:41 +02:00
|
|
|
with:
|
|
|
|
name: Bitwarden-Portable-${{ env._PACKAGE_VERSION }}.exe
|
|
|
|
path: apps/desktop/dist/Bitwarden-Portable-${{ env._PACKAGE_VERSION }}.exe
|
|
|
|
if-no-files-found: error
|
|
|
|
|
|
|
|
- name: Upload installer exe artifact
|
2024-10-17 16:45:49 +02:00
|
|
|
uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # v4.4.3
|
2022-07-21 17:16:41 +02:00
|
|
|
with:
|
|
|
|
name: Bitwarden-Installer-${{ env._PACKAGE_VERSION }}.exe
|
|
|
|
path: apps/desktop/dist/nsis-web/Bitwarden-Installer-${{ env._PACKAGE_VERSION }}.exe
|
|
|
|
if-no-files-found: error
|
|
|
|
|
|
|
|
- name: Upload appx ia32 artifact
|
2024-10-17 16:45:49 +02:00
|
|
|
uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # v4.4.3
|
2022-07-21 17:16:41 +02:00
|
|
|
with:
|
|
|
|
name: Bitwarden-${{ env._PACKAGE_VERSION }}-ia32.appx
|
|
|
|
path: apps/desktop/dist/Bitwarden-${{ env._PACKAGE_VERSION }}-ia32.appx
|
|
|
|
if-no-files-found: error
|
|
|
|
|
|
|
|
- name: Upload store appx ia32 artifact
|
2024-10-17 16:45:49 +02:00
|
|
|
uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # v4.4.3
|
2022-07-21 17:16:41 +02:00
|
|
|
with:
|
|
|
|
name: Bitwarden-${{ env._PACKAGE_VERSION }}-ia32-store.appx
|
|
|
|
path: apps/desktop/dist/Bitwarden-${{ env._PACKAGE_VERSION }}-ia32-store.appx
|
|
|
|
if-no-files-found: error
|
|
|
|
|
|
|
|
- name: Upload NSIS ia32 artifact
|
2024-10-17 16:45:49 +02:00
|
|
|
uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # v4.4.3
|
2022-07-21 17:16:41 +02:00
|
|
|
with:
|
|
|
|
name: bitwarden-${{ env._PACKAGE_VERSION }}-ia32.nsis.7z
|
|
|
|
path: apps/desktop/dist/nsis-web/bitwarden-${{ env._PACKAGE_VERSION }}-ia32.nsis.7z
|
|
|
|
if-no-files-found: error
|
|
|
|
|
|
|
|
- name: Upload appx x64 artifact
|
2024-10-17 16:45:49 +02:00
|
|
|
uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # v4.4.3
|
2022-07-21 17:16:41 +02:00
|
|
|
with:
|
|
|
|
name: Bitwarden-${{ env._PACKAGE_VERSION }}-x64.appx
|
|
|
|
path: apps/desktop/dist/Bitwarden-${{ env._PACKAGE_VERSION }}-x64.appx
|
|
|
|
if-no-files-found: error
|
|
|
|
|
|
|
|
- name: Upload store appx x64 artifact
|
2024-10-17 16:45:49 +02:00
|
|
|
uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # v4.4.3
|
2022-07-21 17:16:41 +02:00
|
|
|
with:
|
|
|
|
name: Bitwarden-${{ env._PACKAGE_VERSION }}-x64-store.appx
|
|
|
|
path: apps/desktop/dist/Bitwarden-${{ env._PACKAGE_VERSION }}-x64-store.appx
|
|
|
|
if-no-files-found: error
|
|
|
|
|
|
|
|
- name: Upload NSIS x64 artifact
|
2024-10-17 16:45:49 +02:00
|
|
|
uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # v4.4.3
|
2022-07-21 17:16:41 +02:00
|
|
|
with:
|
|
|
|
name: bitwarden-${{ env._PACKAGE_VERSION }}-x64.nsis.7z
|
|
|
|
path: apps/desktop/dist/nsis-web/bitwarden-${{ env._PACKAGE_VERSION }}-x64.nsis.7z
|
|
|
|
if-no-files-found: error
|
|
|
|
|
|
|
|
- name: Upload appx ARM64 artifact
|
2024-10-17 16:45:49 +02:00
|
|
|
uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # v4.4.3
|
2022-07-21 17:16:41 +02:00
|
|
|
with:
|
|
|
|
name: Bitwarden-${{ env._PACKAGE_VERSION }}-arm64.appx
|
|
|
|
path: apps/desktop/dist/Bitwarden-${{ env._PACKAGE_VERSION }}-arm64.appx
|
|
|
|
if-no-files-found: error
|
|
|
|
|
|
|
|
- name: Upload store appx ARM64 artifact
|
2024-10-17 16:45:49 +02:00
|
|
|
uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # v4.4.3
|
2022-07-21 17:16:41 +02:00
|
|
|
with:
|
|
|
|
name: Bitwarden-${{ env._PACKAGE_VERSION }}-arm64-store.appx
|
|
|
|
path: apps/desktop/dist/Bitwarden-${{ env._PACKAGE_VERSION }}-arm64-store.appx
|
|
|
|
if-no-files-found: error
|
|
|
|
|
|
|
|
- name: Upload NSIS ARM64 artifact
|
2024-10-17 16:45:49 +02:00
|
|
|
uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # v4.4.3
|
2022-07-21 17:16:41 +02:00
|
|
|
with:
|
|
|
|
name: bitwarden-${{ env._PACKAGE_VERSION }}-arm64.nsis.7z
|
|
|
|
path: apps/desktop/dist/nsis-web/bitwarden-${{ env._PACKAGE_VERSION }}-arm64.nsis.7z
|
|
|
|
if-no-files-found: error
|
|
|
|
|
|
|
|
- name: Upload nupkg artifact
|
2024-10-17 16:45:49 +02:00
|
|
|
uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # v4.4.3
|
2022-07-21 17:16:41 +02:00
|
|
|
with:
|
|
|
|
name: bitwarden.${{ env._PACKAGE_VERSION }}.nupkg
|
|
|
|
path: apps/desktop/dist/chocolatey/bitwarden.${{ env._PACKAGE_VERSION }}.nupkg
|
|
|
|
if-no-files-found: error
|
|
|
|
|
|
|
|
- name: Upload auto-update artifact
|
2024-10-17 16:45:49 +02:00
|
|
|
uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # v4.4.3
|
2022-07-21 17:16:41 +02:00
|
|
|
with:
|
2022-07-30 00:35:47 +02:00
|
|
|
name: ${{ needs.setup.outputs.release-channel }}.yml
|
|
|
|
path: apps/desktop/dist/nsis-web/${{ needs.setup.outputs.release-channel }}.yml
|
2022-07-21 17:16:41 +02:00
|
|
|
if-no-files-found: error
|
|
|
|
|
|
|
|
|
|
|
|
macos-build:
|
|
|
|
name: MacOS Build
|
2024-05-31 21:58:10 +02:00
|
|
|
runs-on: macos-13
|
2022-07-21 17:16:41 +02:00
|
|
|
needs: setup
|
|
|
|
env:
|
2022-07-30 00:35:47 +02:00
|
|
|
_PACKAGE_VERSION: ${{ needs.setup.outputs.release-version }}
|
2023-10-04 18:23:40 +02:00
|
|
|
_NODE_VERSION: ${{ needs.setup.outputs.node_version }}
|
2023-12-21 11:14:13 +01:00
|
|
|
NODE_OPTIONS: --max_old_space_size=4096
|
2022-07-21 17:16:41 +02:00
|
|
|
defaults:
|
|
|
|
run:
|
|
|
|
working-directory: apps/desktop
|
|
|
|
steps:
|
|
|
|
- name: Checkout repo
|
2024-10-17 16:45:49 +02:00
|
|
|
uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4.2.1
|
2022-07-30 00:35:47 +02:00
|
|
|
with:
|
|
|
|
ref: ${{ needs.setup.outputs.branch-name }}
|
2022-07-21 17:16:41 +02:00
|
|
|
|
|
|
|
- name: Set up Node
|
2024-09-24 17:35:01 +02:00
|
|
|
uses: actions/setup-node@0a44ba7841725637a19e28fa30b79a866c81b0a6 # v4.0.4
|
2022-07-21 17:16:41 +02:00
|
|
|
with:
|
|
|
|
cache: 'npm'
|
|
|
|
cache-dependency-path: '**/package-lock.json'
|
2023-10-04 18:23:40 +02:00
|
|
|
node-version: ${{ env._NODE_VERSION }}
|
2022-07-21 17:16:41 +02:00
|
|
|
|
2024-06-24 19:28:34 +02:00
|
|
|
- name: Set up Node-gyp
|
|
|
|
run: python3 -m pip install setuptools
|
|
|
|
|
2022-07-21 17:16:41 +02:00
|
|
|
- name: Print environment
|
|
|
|
run: |
|
|
|
|
node --version
|
|
|
|
npm --version
|
|
|
|
echo "GitHub ref: $GITHUB_REF"
|
|
|
|
echo "GitHub event: $GITHUB_EVENT"
|
|
|
|
|
|
|
|
- name: Cache Build
|
|
|
|
id: build-cache
|
2024-10-17 16:45:49 +02:00
|
|
|
uses: actions/cache@3624ceb22c1c5a301c8db4169662070a689d9ea8 # v4.1.1
|
2022-07-21 17:16:41 +02:00
|
|
|
with:
|
|
|
|
path: apps/desktop/build
|
|
|
|
key: ${{ runner.os }}-${{ github.run_id }}-build
|
|
|
|
|
|
|
|
- name: Cache Safari
|
|
|
|
id: safari-cache
|
2024-10-17 16:45:49 +02:00
|
|
|
uses: actions/cache@3624ceb22c1c5a301c8db4169662070a689d9ea8 # v4.1.1
|
2022-07-21 17:16:41 +02:00
|
|
|
with:
|
|
|
|
path: apps/browser/dist/Safari
|
|
|
|
key: ${{ runner.os }}-${{ github.run_id }}-safari-extension
|
|
|
|
|
2024-02-28 19:06:50 +01:00
|
|
|
- name: Download Provisioning Profiles secrets
|
2022-07-21 17:16:41 +02:00
|
|
|
env:
|
2024-02-28 19:06:50 +01:00
|
|
|
ACCOUNT_NAME: bitwardenci
|
|
|
|
CONTAINER_NAME: profiles
|
2022-07-21 17:16:41 +02:00
|
|
|
run: |
|
|
|
|
mkdir -p $HOME/secrets
|
2024-02-28 19:06:50 +01:00
|
|
|
|
|
|
|
az storage blob download --account-name $ACCOUNT_NAME --container-name $CONTAINER_NAME \
|
|
|
|
--name bitwarden_desktop_appstore.provisionprofile \
|
|
|
|
--file $HOME/secrets/bitwarden_desktop_appstore.provisionprofile \
|
|
|
|
--output none
|
|
|
|
|
|
|
|
- name: Get certificates
|
|
|
|
run: |
|
|
|
|
mkdir -p $HOME/certificates
|
|
|
|
|
|
|
|
az keyvault secret show --id https://bitwarden-ci.vault.azure.net/certificates/bitwarden-desktop-key |
|
|
|
|
jq -r .value | base64 -d > $HOME/certificates/bitwarden-desktop-key.p12
|
2024-05-31 21:58:10 +02:00
|
|
|
|
2024-02-28 19:06:50 +01:00
|
|
|
az keyvault secret show --id https://bitwarden-ci.vault.azure.net/certificates/appstore-app-cert |
|
|
|
|
jq -r .value | base64 -d > $HOME/certificates/appstore-app-cert.p12
|
|
|
|
|
|
|
|
az keyvault secret show --id https://bitwarden-ci.vault.azure.net/certificates/appstore-installer-cert |
|
|
|
|
jq -r .value | base64 -d > $HOME/certificates/appstore-installer-cert.p12
|
|
|
|
|
|
|
|
az keyvault secret show --id https://bitwarden-ci.vault.azure.net/certificates/devid-app-cert |
|
|
|
|
jq -r .value | base64 -d > $HOME/certificates/devid-app-cert.p12
|
|
|
|
|
|
|
|
az keyvault secret show --id https://bitwarden-ci.vault.azure.net/certificates/devid-installer-cert |
|
|
|
|
jq -r .value | base64 -d > $HOME/certificates/devid-installer-cert.p12
|
|
|
|
|
|
|
|
az keyvault secret show --id https://bitwarden-ci.vault.azure.net/certificates/macdev-cert |
|
|
|
|
jq -r .value | base64 -d > $HOME/certificates/macdev-cert.p12
|
2022-07-21 17:16:41 +02:00
|
|
|
|
|
|
|
- name: Set up keychain
|
|
|
|
env:
|
|
|
|
KEYCHAIN_PASSWORD: ${{ secrets.KEYCHAIN_PASSWORD }}
|
|
|
|
run: |
|
|
|
|
security create-keychain -p $KEYCHAIN_PASSWORD build.keychain
|
|
|
|
security default-keychain -s build.keychain
|
|
|
|
security unlock-keychain -p $KEYCHAIN_PASSWORD build.keychain
|
|
|
|
security set-keychain-settings -lut 1200 build.keychain
|
2024-02-28 19:06:50 +01:00
|
|
|
security import "$HOME/certificates/bitwarden-desktop-key.p12" -k build.keychain -P "" \
|
2022-07-21 17:16:41 +02:00
|
|
|
-T /usr/bin/codesign -T /usr/bin/security -T /usr/bin/productbuild
|
2024-02-28 19:06:50 +01:00
|
|
|
|
|
|
|
security import "$HOME/certificates/devid-app-cert.p12" -k build.keychain -P "" \
|
2022-07-21 17:16:41 +02:00
|
|
|
-T /usr/bin/codesign -T /usr/bin/security -T /usr/bin/productbuild
|
2024-02-28 19:06:50 +01:00
|
|
|
|
|
|
|
security import "$HOME/certificates/devid-installer-cert.p12" -k build.keychain -P "" \
|
2022-07-21 17:16:41 +02:00
|
|
|
-T /usr/bin/codesign -T /usr/bin/security -T /usr/bin/productbuild
|
2024-02-28 19:06:50 +01:00
|
|
|
|
|
|
|
security import "$HOME/certificates/appstore-app-cert.p12" -k build.keychain -P "" \
|
2022-07-21 17:16:41 +02:00
|
|
|
-T /usr/bin/codesign -T /usr/bin/security -T /usr/bin/productbuild
|
2024-02-28 19:06:50 +01:00
|
|
|
|
|
|
|
security import "$HOME/certificates/appstore-installer-cert.p12" -k build.keychain -P "" \
|
2022-07-21 17:16:41 +02:00
|
|
|
-T /usr/bin/codesign -T /usr/bin/security -T /usr/bin/productbuild
|
2024-02-28 19:06:50 +01:00
|
|
|
|
|
|
|
security import "$HOME/certificates/macdev-cert.p12" -k build.keychain -P "" \
|
2022-07-21 17:16:41 +02:00
|
|
|
-T /usr/bin/codesign -T /usr/bin/security -T /usr/bin/productbuild
|
2024-02-28 19:06:50 +01:00
|
|
|
|
2022-07-21 17:16:41 +02:00
|
|
|
security set-key-partition-list -S apple-tool:,apple:,codesign: -s -k $KEYCHAIN_PASSWORD build.keychain
|
|
|
|
|
|
|
|
- name: Set up provisioning profiles
|
|
|
|
run: |
|
|
|
|
cp $HOME/secrets/bitwarden_desktop_appstore.provisionprofile \
|
|
|
|
$GITHUB_WORKSPACE/apps/desktop/bitwarden_desktop_appstore.provisionprofile
|
|
|
|
|
|
|
|
- name: Increment version
|
|
|
|
shell: pwsh
|
|
|
|
env:
|
|
|
|
BUILD_NUMBER: ${{ needs.setup.outputs.build_number }}
|
|
|
|
run: |
|
|
|
|
$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
|
|
|
|
|
|
|
|
- name: Install Node dependencies
|
|
|
|
run: npm ci
|
|
|
|
working-directory: ./
|
|
|
|
|
|
|
|
- name: Build application (dev)
|
|
|
|
run: npm run build
|
|
|
|
|
|
|
|
|
|
|
|
macos-package-github:
|
|
|
|
name: MacOS Package GitHub Release Assets
|
2024-05-31 21:58:10 +02:00
|
|
|
runs-on: macos-13
|
2022-07-21 17:16:41 +02:00
|
|
|
needs:
|
|
|
|
- setup
|
|
|
|
- macos-build
|
|
|
|
env:
|
2022-07-30 00:35:47 +02:00
|
|
|
_PACKAGE_VERSION: ${{ needs.setup.outputs.release-version }}
|
2023-10-04 18:23:40 +02:00
|
|
|
_NODE_VERSION: ${{ needs.setup.outputs.node_version }}
|
2023-12-21 11:14:13 +01:00
|
|
|
NODE_OPTIONS: --max_old_space_size=4096
|
2022-07-21 17:16:41 +02:00
|
|
|
defaults:
|
|
|
|
run:
|
|
|
|
working-directory: apps/desktop
|
|
|
|
steps:
|
|
|
|
- name: Checkout repo
|
2024-10-17 16:45:49 +02:00
|
|
|
uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4.2.1
|
2022-07-30 00:35:47 +02:00
|
|
|
with:
|
|
|
|
ref: ${{ needs.setup.outputs.branch-name }}
|
2022-07-21 17:16:41 +02:00
|
|
|
|
|
|
|
- name: Set up Node
|
2024-09-24 17:35:01 +02:00
|
|
|
uses: actions/setup-node@0a44ba7841725637a19e28fa30b79a866c81b0a6 # v4.0.4
|
2022-07-21 17:16:41 +02:00
|
|
|
with:
|
|
|
|
cache: 'npm'
|
|
|
|
cache-dependency-path: '**/package-lock.json'
|
2023-10-04 18:23:40 +02:00
|
|
|
node-version: ${{ env._NODE_VERSION }}
|
2022-07-21 17:16:41 +02:00
|
|
|
|
2024-06-24 19:28:34 +02:00
|
|
|
- name: Set up Node-gyp
|
|
|
|
run: python3 -m pip install setuptools
|
|
|
|
|
2022-07-21 17:16:41 +02:00
|
|
|
- name: Print environment
|
|
|
|
run: |
|
|
|
|
node --version
|
|
|
|
npm --version
|
|
|
|
echo "GitHub ref: $GITHUB_REF"
|
|
|
|
echo "GitHub event: $GITHUB_EVENT"
|
|
|
|
|
|
|
|
- name: Get Build Cache
|
|
|
|
id: build-cache
|
2024-10-17 16:45:49 +02:00
|
|
|
uses: actions/cache@3624ceb22c1c5a301c8db4169662070a689d9ea8 # v4.1.1
|
2022-07-21 17:16:41 +02:00
|
|
|
with:
|
|
|
|
path: apps/desktop/build
|
|
|
|
key: ${{ runner.os }}-${{ github.run_id }}-build
|
|
|
|
|
|
|
|
- name: Setup Safari Cache
|
|
|
|
id: safari-cache
|
2024-10-17 16:45:49 +02:00
|
|
|
uses: actions/cache@3624ceb22c1c5a301c8db4169662070a689d9ea8 # v4.1.1
|
2022-07-21 17:16:41 +02:00
|
|
|
with:
|
|
|
|
path: apps/browser/dist/Safari
|
|
|
|
key: ${{ runner.os }}-${{ github.run_id }}-safari-extension
|
|
|
|
|
2024-02-28 19:06:50 +01:00
|
|
|
- name: Login to Azure
|
|
|
|
uses: Azure/login@e15b166166a8746d1a47596803bd8c1b595455cf # v1.6.0
|
|
|
|
with:
|
|
|
|
creds: ${{ secrets.AZURE_KV_CI_SERVICE_PRINCIPAL }}
|
|
|
|
|
|
|
|
- name: Download Provisioning Profiles secrets
|
2022-07-21 17:16:41 +02:00
|
|
|
env:
|
2024-02-28 19:06:50 +01:00
|
|
|
ACCOUNT_NAME: bitwardenci
|
|
|
|
CONTAINER_NAME: profiles
|
2022-07-21 17:16:41 +02:00
|
|
|
run: |
|
|
|
|
mkdir -p $HOME/secrets
|
2024-02-28 19:06:50 +01:00
|
|
|
|
|
|
|
az storage blob download --account-name $ACCOUNT_NAME --container-name $CONTAINER_NAME \
|
|
|
|
--name bitwarden_desktop_appstore.provisionprofile \
|
|
|
|
--file $HOME/secrets/bitwarden_desktop_appstore.provisionprofile \
|
|
|
|
--output none
|
|
|
|
|
|
|
|
- name: Get certificates
|
|
|
|
run: |
|
|
|
|
mkdir -p $HOME/certificates
|
|
|
|
|
|
|
|
az keyvault secret show --id https://bitwarden-ci.vault.azure.net/certificates/bitwarden-desktop-key |
|
|
|
|
jq -r .value | base64 -d > $HOME/certificates/bitwarden-desktop-key.p12
|
2024-05-31 21:58:10 +02:00
|
|
|
|
2024-02-28 19:06:50 +01:00
|
|
|
az keyvault secret show --id https://bitwarden-ci.vault.azure.net/certificates/appstore-app-cert |
|
|
|
|
jq -r .value | base64 -d > $HOME/certificates/appstore-app-cert.p12
|
|
|
|
|
|
|
|
az keyvault secret show --id https://bitwarden-ci.vault.azure.net/certificates/appstore-installer-cert |
|
|
|
|
jq -r .value | base64 -d > $HOME/certificates/appstore-installer-cert.p12
|
|
|
|
|
|
|
|
az keyvault secret show --id https://bitwarden-ci.vault.azure.net/certificates/devid-app-cert |
|
|
|
|
jq -r .value | base64 -d > $HOME/certificates/devid-app-cert.p12
|
|
|
|
|
|
|
|
az keyvault secret show --id https://bitwarden-ci.vault.azure.net/certificates/devid-installer-cert |
|
|
|
|
jq -r .value | base64 -d > $HOME/certificates/devid-installer-cert.p12
|
|
|
|
|
|
|
|
az keyvault secret show --id https://bitwarden-ci.vault.azure.net/certificates/macdev-cert |
|
|
|
|
jq -r .value | base64 -d > $HOME/certificates/macdev-cert.p12
|
2022-07-21 17:16:41 +02:00
|
|
|
|
|
|
|
- name: Set up keychain
|
|
|
|
env:
|
|
|
|
KEYCHAIN_PASSWORD: ${{ secrets.KEYCHAIN_PASSWORD }}
|
|
|
|
run: |
|
|
|
|
security create-keychain -p $KEYCHAIN_PASSWORD build.keychain
|
|
|
|
security default-keychain -s build.keychain
|
|
|
|
security unlock-keychain -p $KEYCHAIN_PASSWORD build.keychain
|
|
|
|
security set-keychain-settings -lut 1200 build.keychain
|
2024-02-28 19:06:50 +01:00
|
|
|
|
|
|
|
security import "$HOME/certificates/bitwarden-desktop-key.p12" -k build.keychain -P "" \
|
2022-07-21 17:16:41 +02:00
|
|
|
-T /usr/bin/codesign -T /usr/bin/security -T /usr/bin/productbuild
|
2024-02-28 19:06:50 +01:00
|
|
|
|
|
|
|
security import "$HOME/certificates/devid-app-cert.p12" -k build.keychain -P "" \
|
2022-07-21 17:16:41 +02:00
|
|
|
-T /usr/bin/codesign -T /usr/bin/security -T /usr/bin/productbuild
|
2024-02-28 19:06:50 +01:00
|
|
|
|
|
|
|
security import "$HOME/certificates/devid-installer-cert.p12" -k build.keychain -P "" \
|
2022-07-21 17:16:41 +02:00
|
|
|
-T /usr/bin/codesign -T /usr/bin/security -T /usr/bin/productbuild
|
2024-02-28 19:06:50 +01:00
|
|
|
|
|
|
|
security import "$HOME/certificates/appstore-app-cert.p12" -k build.keychain -P "" \
|
2022-07-21 17:16:41 +02:00
|
|
|
-T /usr/bin/codesign -T /usr/bin/security -T /usr/bin/productbuild
|
2024-02-28 19:06:50 +01:00
|
|
|
|
|
|
|
security import "$HOME/certificates/appstore-installer-cert.p12" -k build.keychain -P "" \
|
2022-07-21 17:16:41 +02:00
|
|
|
-T /usr/bin/codesign -T /usr/bin/security -T /usr/bin/productbuild
|
2024-02-28 19:06:50 +01:00
|
|
|
|
|
|
|
security import "$HOME/certificates/macdev-cert.p12" -k build.keychain -P "" \
|
2022-07-21 17:16:41 +02:00
|
|
|
-T /usr/bin/codesign -T /usr/bin/security -T /usr/bin/productbuild
|
2024-02-28 19:06:50 +01:00
|
|
|
|
2022-07-21 17:16:41 +02:00
|
|
|
security set-key-partition-list -S apple-tool:,apple:,codesign: -s -k $KEYCHAIN_PASSWORD build.keychain
|
|
|
|
|
|
|
|
- name: Set up provisioning profiles
|
|
|
|
run: |
|
|
|
|
cp $HOME/secrets/bitwarden_desktop_appstore.provisionprofile \
|
|
|
|
$GITHUB_WORKSPACE/apps/desktop/bitwarden_desktop_appstore.provisionprofile
|
|
|
|
|
|
|
|
- name: Increment version
|
|
|
|
shell: pwsh
|
|
|
|
env:
|
|
|
|
BUILD_NUMBER: ${{ needs.setup.outputs.build_number }}
|
|
|
|
run: |
|
|
|
|
$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
|
|
|
|
|
|
|
|
- name: Install Node dependencies
|
|
|
|
run: npm ci
|
|
|
|
working-directory: ./
|
|
|
|
|
|
|
|
- name: Build
|
|
|
|
if: steps.build-cache.outputs.cache-hit != 'true'
|
|
|
|
run: npm run build
|
|
|
|
|
|
|
|
- name: Download artifact from hotfix-rc
|
2022-08-23 16:27:10 +02:00
|
|
|
if: github.ref == 'refs/heads/hotfix-rc'
|
2024-06-04 16:25:53 +02:00
|
|
|
uses: bitwarden/gh-actions/download-artifacts@main
|
2022-07-21 17:16:41 +02:00
|
|
|
with:
|
|
|
|
workflow: build-browser.yml
|
|
|
|
workflow_conclusion: success
|
2022-07-26 22:43:29 +02:00
|
|
|
branch: hotfix-rc
|
2022-07-21 17:16:41 +02:00
|
|
|
path: ${{ github.workspace }}/browser-build-artifacts
|
|
|
|
|
|
|
|
- name: Download artifact from rc
|
|
|
|
if: github.ref == 'refs/heads/rc'
|
2024-06-04 16:25:53 +02:00
|
|
|
uses: bitwarden/gh-actions/download-artifacts@main
|
2022-07-21 17:16:41 +02:00
|
|
|
with:
|
|
|
|
workflow: build-browser.yml
|
|
|
|
workflow_conclusion: success
|
|
|
|
branch: rc
|
|
|
|
path: ${{ github.workspace }}/browser-build-artifacts
|
|
|
|
|
2023-12-12 20:57:50 +01:00
|
|
|
- name: Download artifacts from main
|
2022-07-26 22:43:29 +02:00
|
|
|
if: ${{ github.ref != 'refs/heads/rc' && github.ref != 'refs/heads/hotfix-rc' }}
|
2024-06-04 16:25:53 +02:00
|
|
|
uses: bitwarden/gh-actions/download-artifacts@main
|
2022-07-21 17:16:41 +02:00
|
|
|
with:
|
|
|
|
workflow: build-browser.yml
|
|
|
|
workflow_conclusion: success
|
2023-12-12 20:57:50 +01:00
|
|
|
branch: main
|
2022-07-21 17:16:41 +02:00
|
|
|
path: ${{ github.workspace }}/browser-build-artifacts
|
|
|
|
|
|
|
|
- name: Unzip Safari artifact
|
|
|
|
run: |
|
|
|
|
SAFARI_DIR=$(find $GITHUB_WORKSPACE/browser-build-artifacts -name 'dist-safari-*.zip')
|
|
|
|
echo $SAFARI_DIR
|
|
|
|
unzip $SAFARI_DIR/dist-safari.zip -d $GITHUB_WORKSPACE/browser-build-artifacts
|
|
|
|
|
|
|
|
- name: Load Safari extension for .dmg
|
|
|
|
run: |
|
|
|
|
mkdir PlugIns
|
|
|
|
cp -r $GITHUB_WORKSPACE/browser-build-artifacts/Safari/dmg/build/Release/safari.appex PlugIns/safari.appex
|
|
|
|
|
|
|
|
- name: Build application (dist)
|
|
|
|
env:
|
|
|
|
APPLE_ID_USERNAME: ${{ secrets.APPLE_ID_USERNAME }}
|
|
|
|
APPLE_ID_PASSWORD: ${{ secrets.APPLE_ID_PASSWORD }}
|
|
|
|
run: npm run pack:mac
|
|
|
|
|
|
|
|
- name: Upload .zip artifact
|
2024-10-17 16:45:49 +02:00
|
|
|
uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # v4.4.3
|
2022-07-21 17:16:41 +02:00
|
|
|
with:
|
|
|
|
name: Bitwarden-${{ env._PACKAGE_VERSION }}-universal-mac.zip
|
|
|
|
path: apps/desktop/dist/Bitwarden-${{ env._PACKAGE_VERSION }}-universal-mac.zip
|
|
|
|
if-no-files-found: error
|
|
|
|
|
|
|
|
- name: Upload .dmg artifact
|
2024-10-17 16:45:49 +02:00
|
|
|
uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # v4.4.3
|
2022-07-21 17:16:41 +02:00
|
|
|
with:
|
|
|
|
name: Bitwarden-${{ env._PACKAGE_VERSION }}-universal.dmg
|
|
|
|
path: apps/desktop/dist/Bitwarden-${{ env._PACKAGE_VERSION }}-universal.dmg
|
|
|
|
if-no-files-found: error
|
|
|
|
|
|
|
|
- name: Upload .dmg blockmap artifact
|
2024-10-17 16:45:49 +02:00
|
|
|
uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # v4.4.3
|
2022-07-21 17:16:41 +02:00
|
|
|
with:
|
|
|
|
name: Bitwarden-${{ env._PACKAGE_VERSION }}-universal.dmg.blockmap
|
|
|
|
path: apps/desktop/dist/Bitwarden-${{ env._PACKAGE_VERSION }}-universal.dmg.blockmap
|
|
|
|
if-no-files-found: error
|
|
|
|
|
|
|
|
- name: Upload auto-update artifact
|
2024-10-17 16:45:49 +02:00
|
|
|
uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # v4.4.3
|
2022-07-21 17:16:41 +02:00
|
|
|
with:
|
2022-07-30 00:35:47 +02:00
|
|
|
name: ${{ needs.setup.outputs.release-channel }}-mac.yml
|
|
|
|
path: apps/desktop/dist/${{ needs.setup.outputs.release-channel }}-mac.yml
|
2022-07-21 17:16:41 +02:00
|
|
|
if-no-files-found: error
|
|
|
|
|
|
|
|
|
|
|
|
macos-package-mas:
|
|
|
|
name: MacOS Package Prod Release Asset
|
2024-05-31 21:58:10 +02:00
|
|
|
runs-on: macos-13
|
2022-07-21 17:16:41 +02:00
|
|
|
needs:
|
|
|
|
- setup
|
|
|
|
- macos-build
|
|
|
|
env:
|
2022-07-30 00:35:47 +02:00
|
|
|
_PACKAGE_VERSION: ${{ needs.setup.outputs.release-version }}
|
2023-10-04 18:23:40 +02:00
|
|
|
_NODE_VERSION: ${{ needs.setup.outputs.node_version }}
|
2023-12-21 11:14:13 +01:00
|
|
|
NODE_OPTIONS: --max_old_space_size=4096
|
2022-07-21 17:16:41 +02:00
|
|
|
defaults:
|
|
|
|
run:
|
|
|
|
working-directory: apps/desktop
|
|
|
|
steps:
|
|
|
|
- name: Checkout repo
|
2024-10-17 16:45:49 +02:00
|
|
|
uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4.2.1
|
2022-07-30 00:35:47 +02:00
|
|
|
with:
|
|
|
|
ref: ${{ needs.setup.outputs.branch-name }}
|
2022-07-21 17:16:41 +02:00
|
|
|
|
|
|
|
- name: Set up Node
|
2024-09-24 17:35:01 +02:00
|
|
|
uses: actions/setup-node@0a44ba7841725637a19e28fa30b79a866c81b0a6 # v4.0.4
|
2022-07-21 17:16:41 +02:00
|
|
|
with:
|
|
|
|
cache: 'npm'
|
|
|
|
cache-dependency-path: '**/package-lock.json'
|
2023-10-04 18:23:40 +02:00
|
|
|
node-version: ${{ env._NODE_VERSION }}
|
2022-07-21 17:16:41 +02:00
|
|
|
|
2024-06-24 19:28:34 +02:00
|
|
|
- name: Set up Node-gyp
|
|
|
|
run: python3 -m pip install setuptools
|
|
|
|
|
2022-07-21 17:16:41 +02:00
|
|
|
- name: Print environment
|
|
|
|
run: |
|
|
|
|
node --version
|
|
|
|
npm --version
|
|
|
|
echo "GitHub ref: $GITHUB_REF"
|
|
|
|
echo "GitHub event: $GITHUB_EVENT"
|
|
|
|
|
|
|
|
- name: Get Build Cache
|
|
|
|
id: build-cache
|
2024-10-17 16:45:49 +02:00
|
|
|
uses: actions/cache@3624ceb22c1c5a301c8db4169662070a689d9ea8 # v4.1.1
|
2022-07-21 17:16:41 +02:00
|
|
|
with:
|
|
|
|
path: apps/desktop/build
|
|
|
|
key: ${{ runner.os }}-${{ github.run_id }}-build
|
|
|
|
|
|
|
|
- name: Setup Safari Cache
|
|
|
|
id: safari-cache
|
2024-10-17 16:45:49 +02:00
|
|
|
uses: actions/cache@3624ceb22c1c5a301c8db4169662070a689d9ea8 # v4.1.1
|
2022-07-21 17:16:41 +02:00
|
|
|
with:
|
|
|
|
path: apps/browser/dist/Safari
|
|
|
|
key: ${{ runner.os }}-${{ github.run_id }}-safari-extension
|
|
|
|
|
2024-02-28 19:06:50 +01:00
|
|
|
- name: Download Provisioning Profiles secrets
|
2022-07-21 17:16:41 +02:00
|
|
|
env:
|
2024-02-28 19:06:50 +01:00
|
|
|
ACCOUNT_NAME: bitwardenci
|
|
|
|
CONTAINER_NAME: profiles
|
2022-07-21 17:16:41 +02:00
|
|
|
run: |
|
|
|
|
mkdir -p $HOME/secrets
|
2024-02-28 19:06:50 +01:00
|
|
|
|
|
|
|
az storage blob download --account-name $ACCOUNT_NAME --container-name $CONTAINER_NAME \
|
|
|
|
--name bitwarden_desktop_appstore.provisionprofile \
|
|
|
|
--file $HOME/secrets/bitwarden_desktop_appstore.provisionprofile \
|
|
|
|
--output none
|
|
|
|
|
|
|
|
- name: Get certificates
|
|
|
|
run: |
|
|
|
|
mkdir -p $HOME/certificates
|
|
|
|
|
|
|
|
az keyvault secret show --id https://bitwarden-ci.vault.azure.net/certificates/bitwarden-desktop-key |
|
|
|
|
jq -r .value | base64 -d > $HOME/certificates/bitwarden-desktop-key.p12
|
2024-05-31 21:58:10 +02:00
|
|
|
|
2024-02-28 19:06:50 +01:00
|
|
|
az keyvault secret show --id https://bitwarden-ci.vault.azure.net/certificates/appstore-app-cert |
|
|
|
|
jq -r .value | base64 -d > $HOME/certificates/appstore-app-cert.p12
|
|
|
|
|
|
|
|
az keyvault secret show --id https://bitwarden-ci.vault.azure.net/certificates/appstore-installer-cert |
|
|
|
|
jq -r .value | base64 -d > $HOME/certificates/appstore-installer-cert.p12
|
|
|
|
|
|
|
|
az keyvault secret show --id https://bitwarden-ci.vault.azure.net/certificates/devid-app-cert |
|
|
|
|
jq -r .value | base64 -d > $HOME/certificates/devid-app-cert.p12
|
|
|
|
|
|
|
|
az keyvault secret show --id https://bitwarden-ci.vault.azure.net/certificates/devid-installer-cert |
|
|
|
|
jq -r .value | base64 -d > $HOME/certificates/devid-installer-cert.p12
|
|
|
|
|
|
|
|
az keyvault secret show --id https://bitwarden-ci.vault.azure.net/certificates/macdev-cert |
|
|
|
|
jq -r .value | base64 -d > $HOME/certificates/macdev-cert.p12
|
2022-07-21 17:16:41 +02:00
|
|
|
|
|
|
|
- name: Set up keychain
|
|
|
|
env:
|
|
|
|
KEYCHAIN_PASSWORD: ${{ secrets.KEYCHAIN_PASSWORD }}
|
|
|
|
run: |
|
|
|
|
security create-keychain -p $KEYCHAIN_PASSWORD build.keychain
|
|
|
|
security default-keychain -s build.keychain
|
|
|
|
security unlock-keychain -p $KEYCHAIN_PASSWORD build.keychain
|
|
|
|
security set-keychain-settings -lut 1200 build.keychain
|
2024-02-28 19:06:50 +01:00
|
|
|
|
|
|
|
security import "$HOME/certificates/bitwarden-desktop-key.p12" -k build.keychain -P "" \
|
2022-07-21 17:16:41 +02:00
|
|
|
-T /usr/bin/codesign -T /usr/bin/security -T /usr/bin/productbuild
|
2024-02-28 19:06:50 +01:00
|
|
|
|
|
|
|
security import "$HOME/certificates/devid-app-cert.p12" -k build.keychain -P "" \
|
2022-07-21 17:16:41 +02:00
|
|
|
-T /usr/bin/codesign -T /usr/bin/security -T /usr/bin/productbuild
|
2024-02-28 19:06:50 +01:00
|
|
|
|
|
|
|
security import "$HOME/certificates/devid-installer-cert.p12" -k build.keychain -P "" \
|
2022-07-21 17:16:41 +02:00
|
|
|
-T /usr/bin/codesign -T /usr/bin/security -T /usr/bin/productbuild
|
2024-02-28 19:06:50 +01:00
|
|
|
|
|
|
|
security import "$HOME/certificates/appstore-app-cert.p12" -k build.keychain -P "" \
|
2022-07-21 17:16:41 +02:00
|
|
|
-T /usr/bin/codesign -T /usr/bin/security -T /usr/bin/productbuild
|
2024-02-28 19:06:50 +01:00
|
|
|
|
|
|
|
security import "$HOME/certificates/appstore-installer-cert.p12" -k build.keychain -P "" \
|
2022-07-21 17:16:41 +02:00
|
|
|
-T /usr/bin/codesign -T /usr/bin/security -T /usr/bin/productbuild
|
2024-02-28 19:06:50 +01:00
|
|
|
|
|
|
|
security import "$HOME/certificates/macdev-cert.p12" -k build.keychain -P "" \
|
2022-07-21 17:16:41 +02:00
|
|
|
-T /usr/bin/codesign -T /usr/bin/security -T /usr/bin/productbuild
|
2024-02-28 19:06:50 +01:00
|
|
|
|
2022-07-21 17:16:41 +02:00
|
|
|
security set-key-partition-list -S apple-tool:,apple:,codesign: -s -k $KEYCHAIN_PASSWORD build.keychain
|
|
|
|
|
|
|
|
- name: Set up provisioning profiles
|
|
|
|
run: |
|
|
|
|
cp $HOME/secrets/bitwarden_desktop_appstore.provisionprofile \
|
|
|
|
$GITHUB_WORKSPACE/apps/desktop/bitwarden_desktop_appstore.provisionprofile
|
|
|
|
|
|
|
|
- name: Increment version
|
|
|
|
shell: pwsh
|
|
|
|
env:
|
|
|
|
BUILD_NUMBER: ${{ needs.setup.outputs.build_number }}
|
|
|
|
run: |
|
|
|
|
$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
|
|
|
|
|
|
|
|
- name: Install Node dependencies
|
|
|
|
run: npm ci
|
|
|
|
working-directory: ./
|
|
|
|
|
|
|
|
- name: Build
|
|
|
|
if: steps.build-cache.outputs.cache-hit != 'true'
|
|
|
|
run: npm run build
|
|
|
|
|
|
|
|
- name: Download artifact from hotfix-rc
|
2022-08-23 16:27:10 +02:00
|
|
|
if: github.ref == 'refs/heads/hotfix-rc'
|
2024-06-04 16:25:53 +02:00
|
|
|
uses: bitwarden/gh-actions/download-artifacts@main
|
2022-07-21 17:16:41 +02:00
|
|
|
with:
|
|
|
|
workflow: build-browser.yml
|
|
|
|
workflow_conclusion: success
|
2022-07-26 22:43:29 +02:00
|
|
|
branch: hotfix-rc
|
2022-07-21 17:16:41 +02:00
|
|
|
path: ${{ github.workspace }}/browser-build-artifacts
|
|
|
|
|
|
|
|
- name: Download artifact from rc
|
|
|
|
if: github.ref == 'refs/heads/rc'
|
2024-06-04 16:25:53 +02:00
|
|
|
uses: bitwarden/gh-actions/download-artifacts@main
|
2022-07-21 17:16:41 +02:00
|
|
|
with:
|
|
|
|
workflow: build-browser.yml
|
|
|
|
workflow_conclusion: success
|
|
|
|
branch: rc
|
|
|
|
path: ${{ github.workspace }}/browser-build-artifacts
|
|
|
|
|
2023-12-12 20:57:50 +01:00
|
|
|
- name: Download artifact from main
|
2022-07-26 22:43:29 +02:00
|
|
|
if: ${{ github.ref != 'refs/heads/rc' && github.ref != 'refs/heads/hotfix-rc' }}
|
2024-06-04 16:25:53 +02:00
|
|
|
uses: bitwarden/gh-actions/download-artifacts@main
|
2022-07-21 17:16:41 +02:00
|
|
|
with:
|
|
|
|
workflow: build-browser.yml
|
|
|
|
workflow_conclusion: success
|
2023-12-12 20:57:50 +01:00
|
|
|
branch: main
|
2022-07-21 17:16:41 +02:00
|
|
|
path: ${{ github.workspace }}/browser-build-artifacts
|
|
|
|
|
|
|
|
- name: Unzip Safari artifact
|
|
|
|
run: |
|
|
|
|
SAFARI_DIR=$(find $GITHUB_WORKSPACE/browser-build-artifacts -name 'dist-safari-*.zip')
|
|
|
|
echo $SAFARI_DIR
|
|
|
|
unzip $SAFARI_DIR/dist-safari.zip -d $GITHUB_WORKSPACE/browser-build-artifacts
|
|
|
|
|
|
|
|
- name: Load Safari extension for App Store
|
|
|
|
run: |
|
|
|
|
mkdir PlugIns
|
|
|
|
cp -r $GITHUB_WORKSPACE/browser-build-artifacts/Safari/mas/build/Release/safari.appex PlugIns/safari.appex
|
|
|
|
|
|
|
|
- name: Build application for App Store
|
|
|
|
run: npm run pack:mac:mas
|
|
|
|
env:
|
|
|
|
APPLE_ID_USERNAME: ${{ secrets.APPLE_ID_USERNAME }}
|
|
|
|
APPLE_ID_PASSWORD: ${{ secrets.APPLE_ID_PASSWORD }}
|
|
|
|
|
|
|
|
- name: Upload .pkg artifact
|
2024-10-17 16:45:49 +02:00
|
|
|
uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # v4.4.3
|
2022-07-21 17:16:41 +02:00
|
|
|
with:
|
|
|
|
name: Bitwarden-${{ env._PACKAGE_VERSION }}-universal.pkg
|
|
|
|
path: apps/desktop/dist/mas-universal/Bitwarden-${{ env._PACKAGE_VERSION }}-universal.pkg
|
|
|
|
if-no-files-found: error
|
|
|
|
|
|
|
|
release:
|
2022-07-30 00:35:47 +02:00
|
|
|
name: Release beta channel to S3
|
2024-02-08 21:56:39 +01:00
|
|
|
runs-on: ubuntu-22.04
|
2022-07-21 17:16:41 +02:00
|
|
|
needs:
|
|
|
|
- setup
|
|
|
|
- linux
|
|
|
|
- windows
|
|
|
|
- macos-build
|
|
|
|
- macos-package-github
|
|
|
|
- macos-package-mas
|
|
|
|
steps:
|
2022-08-08 19:21:49 +02:00
|
|
|
- name: Create GitHub deployment
|
2024-02-08 20:38:19 +01:00
|
|
|
uses: chrnorm/deployment-action@55729fcebec3d284f60f5bcabbd8376437d696b1 # v2.0.7
|
2022-08-08 19:21:49 +02:00
|
|
|
id: deployment
|
|
|
|
with:
|
|
|
|
token: '${{ secrets.GITHUB_TOKEN }}'
|
|
|
|
initial-status: 'in_progress'
|
|
|
|
environment: 'Desktop - Beta'
|
|
|
|
description: 'Deployment ${{ needs.setup.outputs.release-version }} to channel ${{ needs.setup.outputs.release-channel }} from branch ${{ needs.setup.outputs.branch-name }}'
|
|
|
|
task: release
|
|
|
|
|
2022-07-21 17:16:41 +02:00
|
|
|
- name: Login to Azure
|
2024-02-08 20:38:19 +01:00
|
|
|
uses: Azure/login@e15b166166a8746d1a47596803bd8c1b595455cf # v1.6.0
|
2022-07-21 17:16:41 +02:00
|
|
|
with:
|
2023-04-11 18:37:58 +02:00
|
|
|
creds: ${{ secrets.AZURE_KV_CI_SERVICE_PRINCIPAL }}
|
2022-07-21 17:16:41 +02:00
|
|
|
|
|
|
|
- name: Retrieve secrets
|
|
|
|
id: retrieve-secrets
|
2023-11-08 19:08:34 +01:00
|
|
|
uses: bitwarden/gh-actions/get-keyvault-secrets@main
|
2022-10-13 21:38:47 +02:00
|
|
|
with:
|
2023-04-11 18:37:58 +02:00
|
|
|
keyvault: "bitwarden-ci"
|
2022-10-13 21:38:47 +02:00
|
|
|
secrets: "aws-electron-access-id,
|
2022-09-05 11:39:27 +02:00
|
|
|
aws-electron-access-key,
|
2024-04-24 17:01:51 +02:00
|
|
|
aws-electron-bucket-name"
|
2022-07-21 17:16:41 +02:00
|
|
|
|
|
|
|
- name: Download all artifacts
|
2024-08-26 22:45:28 +02:00
|
|
|
uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8
|
2022-07-21 17:16:41 +02:00
|
|
|
with:
|
|
|
|
path: apps/desktop/artifacts
|
|
|
|
|
|
|
|
- name: Rename .pkg to .pkg.archive
|
|
|
|
env:
|
2022-08-08 19:21:49 +02:00
|
|
|
PKG_VERSION: ${{ needs.setup.outputs.release-version }}
|
2022-07-21 17:16:41 +02:00
|
|
|
working-directory: apps/desktop/artifacts
|
|
|
|
run: mv Bitwarden-${{ env.PKG_VERSION }}-universal.pkg Bitwarden-${{ env.PKG_VERSION }}-universal.pkg.archive
|
|
|
|
|
2022-07-30 00:35:47 +02:00
|
|
|
- name: Publish artifacts to S3
|
|
|
|
env:
|
|
|
|
AWS_ACCESS_KEY_ID: ${{ steps.retrieve-secrets.outputs.aws-electron-access-id }}
|
|
|
|
AWS_SECRET_ACCESS_KEY: ${{ steps.retrieve-secrets.outputs.aws-electron-access-key }}
|
|
|
|
AWS_DEFAULT_REGION: 'us-west-2'
|
|
|
|
AWS_S3_BUCKET_NAME: ${{ steps.retrieve-secrets.outputs.aws-electron-bucket-name }}
|
|
|
|
working-directory: apps/desktop/artifacts
|
|
|
|
run: |
|
|
|
|
aws s3 cp ./ $AWS_S3_BUCKET_NAME/desktop/ \
|
|
|
|
--acl "public-read" \
|
|
|
|
--recursive \
|
|
|
|
--quiet
|
|
|
|
|
2022-08-08 19:21:49 +02:00
|
|
|
- name: Update deployment status to Success
|
|
|
|
if: ${{ success() }}
|
2024-03-06 19:49:15 +01:00
|
|
|
uses: chrnorm/deployment-status@9a72af4586197112e0491ea843682b5dc280d806 # v2.0.3
|
2022-08-08 19:21:49 +02:00
|
|
|
with:
|
|
|
|
token: '${{ secrets.GITHUB_TOKEN }}'
|
|
|
|
state: 'success'
|
|
|
|
deployment-id: ${{ steps.deployment.outputs.deployment_id }}
|
|
|
|
|
|
|
|
- name: Update deployment status to Failure
|
|
|
|
if: ${{ failure() }}
|
2024-03-06 19:49:15 +01:00
|
|
|
uses: chrnorm/deployment-status@9a72af4586197112e0491ea843682b5dc280d806 # v2.0.3
|
2022-08-08 19:21:49 +02:00
|
|
|
with:
|
|
|
|
token: '${{ secrets.GITHUB_TOKEN }}'
|
|
|
|
state: 'failure'
|
|
|
|
deployment-id: ${{ steps.deployment.outputs.deployment_id }}
|
2022-07-30 00:35:47 +02:00
|
|
|
|
|
|
|
remove-branch:
|
|
|
|
name: Remove branch
|
2024-02-08 21:56:39 +01:00
|
|
|
runs-on: ubuntu-22.04
|
2022-07-30 00:35:47 +02:00
|
|
|
if: always()
|
|
|
|
needs:
|
|
|
|
- setup
|
|
|
|
- linux
|
|
|
|
- windows
|
|
|
|
- macos-build
|
|
|
|
- macos-package-github
|
|
|
|
- macos-package-mas
|
|
|
|
- release
|
|
|
|
steps:
|
|
|
|
- name: Checkout repo
|
2024-10-17 16:45:49 +02:00
|
|
|
uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4.2.1
|
2022-07-30 00:35:47 +02:00
|
|
|
|
|
|
|
- name: Setup git config
|
|
|
|
run: |
|
|
|
|
git config --global user.name "GitHub Action Bot"
|
|
|
|
git config --global user.email "41898282+github-actions[bot]@users.noreply.github.com"
|
|
|
|
git config --global url."https://github.com/".insteadOf ssh://git@github.com/
|
|
|
|
git config --global url."https://".insteadOf ssh://
|
|
|
|
- name: Remove branch
|
|
|
|
env:
|
|
|
|
BRANCH: ${{ needs.setup.outputs.branch-name }}
|
|
|
|
run: git push origin --delete $BRANCH
|