2020-03-24 14:03:14 +01:00
|
|
|
name: Build
|
|
|
|
|
2021-01-06 21:38:30 +01:00
|
|
|
on:
|
|
|
|
push:
|
|
|
|
branches-ignore:
|
|
|
|
- 'l10n_master'
|
|
|
|
- 'gh-pages'
|
2020-03-24 14:03:14 +01:00
|
|
|
|
|
|
|
jobs:
|
2020-09-24 18:17:41 +02:00
|
|
|
cloc:
|
2021-06-01 23:14:02 +02:00
|
|
|
name: CLOC
|
2020-09-24 18:17:41 +02:00
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- name: Checkout repo
|
2021-06-07 18:00:13 +02:00
|
|
|
uses: actions/checkout@5a4ac9002d0be2fb38bd78e4b4dbde5606d7042f # v2.3.4
|
2020-09-24 18:17:41 +02:00
|
|
|
|
|
|
|
- name: Set up cloc
|
|
|
|
run: |
|
|
|
|
sudo apt-get update
|
|
|
|
sudo apt-get -y install cloc
|
|
|
|
|
|
|
|
- name: Print lines of code
|
|
|
|
run: cloc --include-lang TypeScript,JavaScript,HTML,Sass,CSS --vcs git
|
|
|
|
|
2020-09-24 22:38:30 +02:00
|
|
|
linux:
|
2021-06-07 18:00:13 +02:00
|
|
|
name: Linux Build
|
2020-09-24 22:38:30 +02:00
|
|
|
runs-on: ubuntu-latest
|
2020-03-24 14:03:14 +01:00
|
|
|
steps:
|
2021-06-07 18:00:13 +02:00
|
|
|
- name: Checkout repo
|
|
|
|
uses: actions/checkout@5a4ac9002d0be2fb38bd78e4b4dbde5606d7042f # v2.3.4
|
|
|
|
|
2020-03-24 14:03:14 +01:00
|
|
|
- name: Set up Node
|
2021-06-07 18:00:13 +02:00
|
|
|
uses: actions/setup-node@46071b5c7a2e0c34e49c3cb8a0e792e86e18d5ea # v2.1.5
|
2020-03-24 14:03:14 +01:00
|
|
|
with:
|
2021-05-18 15:21:26 +02:00
|
|
|
node-version: '14'
|
2020-03-24 14:03:14 +01:00
|
|
|
|
2021-06-07 18:00:13 +02:00
|
|
|
- name: Cache Node Modules
|
|
|
|
id: node-modules-cache
|
|
|
|
uses: actions/cache@c64c572235d810460d0d6876e9c705ad5002b353 # v2.1.6
|
|
|
|
with:
|
|
|
|
path: '**/node_modules'
|
|
|
|
key: ${{ runner.os }}-${{ github.run_id }}-node-${{ hashFiles('**/package-lock.json') }}
|
|
|
|
|
|
|
|
- name: Set Node options
|
|
|
|
run: echo "NODE_OPTIONS=--max_old_space_size=4096" >> $GITHUB_ENV
|
|
|
|
|
2021-05-26 22:44:48 +02:00
|
|
|
- name: Update NPM
|
|
|
|
run: |
|
|
|
|
npm install -g npm@7
|
|
|
|
npm install -g node-gyp
|
|
|
|
node-gyp install $(node -v)
|
|
|
|
|
2020-03-24 15:33:49 +01:00
|
|
|
- name: Set up environment
|
2020-03-24 14:03:14 +01:00
|
|
|
run: |
|
2020-09-24 22:38:30 +02:00
|
|
|
sudo apt-get update
|
|
|
|
sudo apt-get -y install pkg-config libxss-dev libsecret-1-dev rpm
|
2020-03-24 14:03:14 +01:00
|
|
|
|
2021-06-07 18:00:13 +02:00
|
|
|
- name: Set up Snap
|
2021-01-20 16:53:35 +01:00
|
|
|
run: |
|
|
|
|
sudo snap install snapcraft --classic
|
2020-09-30 19:21:16 +02:00
|
|
|
|
2020-03-24 14:03:14 +01:00
|
|
|
- name: Print environment
|
|
|
|
run: |
|
|
|
|
node --version
|
|
|
|
npm --version
|
2020-09-30 19:21:16 +02:00
|
|
|
snap --version
|
2020-09-30 19:28:06 +02:00
|
|
|
snapcraft --version || echo 'snapcraft unavailable'
|
2020-03-24 14:03:14 +01:00
|
|
|
|
2020-09-24 22:38:30 +02:00
|
|
|
- name: Load package version
|
|
|
|
run: ./.github/scripts/load-version.ps1
|
2020-03-24 15:33:49 +01:00
|
|
|
shell: pwsh
|
2020-09-24 22:38:30 +02:00
|
|
|
|
|
|
|
- name: Install Node dependencies
|
2021-06-07 18:00:13 +02:00
|
|
|
if: steps.node-modules-cache.outputs.cache-hit != 'true'
|
2020-09-24 22:38:30 +02:00
|
|
|
run: npm install
|
|
|
|
|
|
|
|
- name: Run linter
|
|
|
|
run: npm run lint
|
|
|
|
|
|
|
|
- name: Build application
|
|
|
|
run: npm run dist:lin
|
|
|
|
|
|
|
|
- name: Upload .deb artifact
|
2021-06-07 18:00:13 +02:00
|
|
|
uses: actions/upload-artifact@ee69f02b3dfdecd58bb31b4d133da38ba6fe3700 # v2.2.3
|
2020-09-24 22:38:30 +02:00
|
|
|
with:
|
|
|
|
name: Bitwarden-${{ env.PACKAGE_VERSION }}-amd64.deb
|
|
|
|
path: ./dist/Bitwarden-${{ env.PACKAGE_VERSION }}-amd64.deb
|
2021-06-01 23:14:02 +02:00
|
|
|
if-no-files-found: error
|
2020-09-24 22:38:30 +02:00
|
|
|
|
|
|
|
- name: Upload .rpm artifact
|
2021-06-07 18:00:13 +02:00
|
|
|
uses: actions/upload-artifact@ee69f02b3dfdecd58bb31b4d133da38ba6fe3700 # v2.2.3
|
2020-09-24 22:38:30 +02:00
|
|
|
with:
|
2020-09-25 17:20:42 +02:00
|
|
|
name: Bitwarden-${{ env.PACKAGE_VERSION }}-x86_64.rpm
|
|
|
|
path: ./dist/Bitwarden-${{ env.PACKAGE_VERSION }}-x86_64.rpm
|
2021-06-01 23:14:02 +02:00
|
|
|
if-no-files-found: error
|
2020-09-24 22:38:30 +02:00
|
|
|
|
|
|
|
- name: Upload .freebsd artifact
|
2021-06-07 18:00:13 +02:00
|
|
|
uses: actions/upload-artifact@ee69f02b3dfdecd58bb31b4d133da38ba6fe3700 # v2.2.3
|
2020-09-24 22:38:30 +02:00
|
|
|
with:
|
|
|
|
name: Bitwarden-${{ env.PACKAGE_VERSION }}-x64.freebsd
|
|
|
|
path: ./dist/Bitwarden-${{ env.PACKAGE_VERSION }}-x64.freebsd
|
2021-06-01 23:14:02 +02:00
|
|
|
if-no-files-found: error
|
2020-09-24 22:38:30 +02:00
|
|
|
|
|
|
|
- name: Upload .snap artifact
|
2021-06-07 18:00:13 +02:00
|
|
|
uses: actions/upload-artifact@ee69f02b3dfdecd58bb31b4d133da38ba6fe3700 # v2.2.3
|
2020-09-24 22:38:30 +02:00
|
|
|
with:
|
2020-09-25 16:55:47 +02:00
|
|
|
name: bitwarden_${{ env.PACKAGE_VERSION }}_amd64.snap
|
|
|
|
path: ./dist/bitwarden_${{ env.PACKAGE_VERSION }}_amd64.snap
|
2021-06-01 23:14:02 +02:00
|
|
|
if-no-files-found: error
|
2020-09-24 22:38:30 +02:00
|
|
|
|
|
|
|
- name: Upload .AppImage artifact
|
2021-06-07 18:00:13 +02:00
|
|
|
uses: actions/upload-artifact@ee69f02b3dfdecd58bb31b4d133da38ba6fe3700 # v2.2.3
|
2020-09-24 22:38:30 +02:00
|
|
|
with:
|
2020-09-25 17:20:42 +02:00
|
|
|
name: Bitwarden-${{ env.PACKAGE_VERSION }}-x86_64.AppImage
|
|
|
|
path: ./dist/Bitwarden-${{ env.PACKAGE_VERSION }}-x86_64.AppImage
|
2021-06-01 23:14:02 +02:00
|
|
|
if-no-files-found: error
|
2020-09-24 22:38:30 +02:00
|
|
|
|
|
|
|
windows:
|
2021-06-07 18:00:13 +02:00
|
|
|
name: Windows Build
|
2020-09-24 22:38:30 +02:00
|
|
|
runs-on: windows-latest
|
|
|
|
steps:
|
2021-06-07 18:00:13 +02:00
|
|
|
- name: Checkout repo
|
|
|
|
uses: actions/checkout@5a4ac9002d0be2fb38bd78e4b4dbde5606d7042f # v2.3.4
|
|
|
|
|
2021-01-15 20:54:07 +01:00
|
|
|
- name: Set up dotnet
|
2021-06-07 18:00:13 +02:00
|
|
|
uses: actions/setup-dotnet@a71d1eb2c86af85faa8c772c03fb365e377e45ea # v1.8.0
|
2021-01-15 20:54:07 +01:00
|
|
|
with:
|
|
|
|
dotnet-version: "3.1.x"
|
|
|
|
|
2020-09-24 22:38:30 +02:00
|
|
|
- name: Set up Node
|
2021-06-07 18:00:13 +02:00
|
|
|
uses: actions/setup-node@46071b5c7a2e0c34e49c3cb8a0e792e86e18d5ea # v2.1.5
|
2020-09-24 22:38:30 +02:00
|
|
|
with:
|
2021-05-18 15:21:26 +02:00
|
|
|
node-version: '14'
|
2020-09-24 22:38:30 +02:00
|
|
|
|
2021-06-07 18:00:13 +02:00
|
|
|
- name: Cache Node Modules
|
|
|
|
id: node-modules-cache
|
|
|
|
uses: actions/cache@c64c572235d810460d0d6876e9c705ad5002b353 # v2.1.6
|
|
|
|
with:
|
|
|
|
path: '**/node_modules'
|
|
|
|
key: ${{ runner.os }}-${{ github.run_id }}-node-${{ hashFiles('**/package-lock.json') }}
|
|
|
|
|
|
|
|
- name: Set Node options
|
|
|
|
run: echo "NODE_OPTIONS=--max_old_space_size=4096" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
|
|
|
|
shell: pwsh
|
|
|
|
|
2021-05-26 22:44:48 +02:00
|
|
|
- name: Update NPM
|
|
|
|
run: |
|
|
|
|
npm install -g npm@7
|
|
|
|
npm install -g node-gyp
|
|
|
|
node-gyp install $(node -v)
|
|
|
|
|
2021-01-15 20:54:07 +01:00
|
|
|
- name: Install AST
|
|
|
|
shell: pwsh
|
|
|
|
run: |
|
|
|
|
cd $HOME
|
|
|
|
|
|
|
|
git clone https://github.com/vcsjones/AzureSignTool.git
|
|
|
|
cd AzureSignTool
|
|
|
|
$latest_head = $(git rev-parse HEAD)[0..9] -join ""
|
|
|
|
$latest_version = "0.0.0-g$latest_head"
|
|
|
|
|
|
|
|
Write-Host "--------"
|
|
|
|
Write-Host "git commit - $(git rev-parse HEAD)"
|
|
|
|
Write-Host "latest_head - $latest_head"
|
|
|
|
Write-Host "PACKAGE VERSION TO BUILD - $latest_version"
|
|
|
|
Write-Host "--------"
|
|
|
|
|
|
|
|
dotnet restore
|
|
|
|
dotnet pack --output ./nupkg
|
|
|
|
dotnet tool install --global --ignore-failed-sources --add-source ./nupkg --version $latest_version azuresigntool
|
|
|
|
|
2021-01-20 16:53:35 +01:00
|
|
|
- name: Set up environment
|
|
|
|
shell: pwsh
|
|
|
|
run: |
|
|
|
|
choco install checksum --no-progress
|
2020-09-30 19:21:16 +02:00
|
|
|
|
2020-09-24 22:38:30 +02:00
|
|
|
- name: Print environment
|
2020-03-24 15:33:49 +01:00
|
|
|
run: |
|
2020-09-24 22:38:30 +02:00
|
|
|
node --version
|
|
|
|
npm --version
|
2021-01-14 22:50:25 +01:00
|
|
|
choco --version
|
2020-09-24 22:38:30 +02:00
|
|
|
|
|
|
|
- name: Load package version
|
|
|
|
run: ./.github/scripts/load-version.ps1
|
|
|
|
shell: pwsh
|
2020-03-24 15:33:49 +01:00
|
|
|
|
2020-03-24 14:03:14 +01:00
|
|
|
- name: Install Node dependencies
|
2021-06-07 18:00:13 +02:00
|
|
|
if: steps.node-modules-cache.outputs.cache-hit != 'true'
|
2020-03-24 14:03:14 +01:00
|
|
|
run: npm install
|
|
|
|
|
|
|
|
- name: Run linter
|
|
|
|
run: npm run lint
|
|
|
|
|
2021-01-15 20:54:07 +01:00
|
|
|
- name: Build & Sign (dev)
|
|
|
|
run: |
|
|
|
|
npm run build
|
|
|
|
npm run pack:win
|
|
|
|
env:
|
|
|
|
ELECTRON_BUILDER_SIGN: 1
|
|
|
|
SIGNING_VAULT_URL: ${{ secrets.SIGNING_VAULT_URL }}
|
|
|
|
SIGNING_CLIENT_ID: ${{ secrets.SIGNING_CLIENT_ID }}
|
|
|
|
SIGNING_TENANT_ID: ${{ secrets.SIGNING_TENANT_ID }}
|
|
|
|
SIGNING_CLIENT_SECRET: ${{ secrets.SIGNING_CLIENT_SECRET }}
|
|
|
|
SIGNING_CERT_NAME: ${{ secrets.SIGNING_CERT_NAME }}
|
|
|
|
|
2020-09-30 19:21:16 +02:00
|
|
|
- name: Rename appx files for store
|
|
|
|
shell: pwsh
|
|
|
|
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"
|
2021-01-26 04:16:19 +01:00
|
|
|
Copy-Item "./dist/Bitwarden-${{ env.PACKAGE_VERSION }}-arm64.appx" `
|
|
|
|
-Destination "./dist/Bitwarden-${{ env.PACKAGE_VERSION }}-arm64-store.appx"
|
2020-09-30 19:21:16 +02:00
|
|
|
|
2021-03-04 18:54:14 +01:00
|
|
|
- name: Building for Chocolatey
|
2021-01-22 03:46:11 +01:00
|
|
|
shell: pwsh
|
|
|
|
run: |
|
2021-01-22 05:53:28 +01:00
|
|
|
Copy-Item -Path ./stores/chocolatey -Destination ./dist/chocolatey -Recurse
|
|
|
|
Copy-Item -Path ./dist/nsis-web/Bitwarden-Installer-${{ env.PACKAGE_VERSION }}.exe -Destination ./dist/chocolatey
|
2021-01-22 03:46:11 +01:00
|
|
|
|
2021-01-22 05:53:28 +01:00
|
|
|
$checksum = checksum -t sha256 ./dist/chocoloatey/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
|
2021-01-22 03:46:11 +01:00
|
|
|
|
2020-09-24 22:38:30 +02:00
|
|
|
- name: Upload portable exe artifact
|
2021-06-07 18:00:13 +02:00
|
|
|
uses: actions/upload-artifact@ee69f02b3dfdecd58bb31b4d133da38ba6fe3700 # v2.2.3
|
2020-09-24 22:38:30 +02:00
|
|
|
with:
|
|
|
|
name: Bitwarden-Portable-${{ env.PACKAGE_VERSION }}.exe
|
|
|
|
path: ./dist/Bitwarden-Portable-${{ env.PACKAGE_VERSION }}.exe
|
2021-06-01 23:14:02 +02:00
|
|
|
if-no-files-found: error
|
2020-09-24 22:38:30 +02:00
|
|
|
|
|
|
|
- name: Upload installer exe artifact
|
2021-06-07 18:00:13 +02:00
|
|
|
uses: actions/upload-artifact@ee69f02b3dfdecd58bb31b4d133da38ba6fe3700 # v2.2.3
|
2020-09-24 22:38:30 +02:00
|
|
|
with:
|
|
|
|
name: Bitwarden-Installer-${{ env.PACKAGE_VERSION }}.exe
|
|
|
|
path: ./dist/nsis-web/Bitwarden-Installer-${{ env.PACKAGE_VERSION }}.exe
|
2021-06-01 23:14:02 +02:00
|
|
|
if-no-files-found: error
|
2020-09-24 22:38:30 +02:00
|
|
|
|
|
|
|
- name: Upload store appx ia32 artifact
|
2021-06-07 18:00:13 +02:00
|
|
|
uses: actions/upload-artifact@ee69f02b3dfdecd58bb31b4d133da38ba6fe3700 # v2.2.3
|
2020-09-24 22:38:30 +02:00
|
|
|
with:
|
|
|
|
name: Bitwarden-${{ env.PACKAGE_VERSION }}-ia32-store.appx
|
2020-09-30 19:21:16 +02:00
|
|
|
path: ./dist/Bitwarden-${{ env.PACKAGE_VERSION }}-ia32-store.appx
|
2021-06-01 23:14:02 +02:00
|
|
|
if-no-files-found: error
|
2020-09-24 22:38:30 +02:00
|
|
|
|
|
|
|
- name: Upload store appx x64 artifact
|
2021-06-07 18:00:13 +02:00
|
|
|
uses: actions/upload-artifact@ee69f02b3dfdecd58bb31b4d133da38ba6fe3700 # v2.2.3
|
2020-03-24 16:00:46 +01:00
|
|
|
with:
|
2020-09-24 22:38:30 +02:00
|
|
|
name: Bitwarden-${{ env.PACKAGE_VERSION }}-x64-store.appx
|
2020-09-30 19:21:16 +02:00
|
|
|
path: ./dist/Bitwarden-${{ env.PACKAGE_VERSION }}-x64-store.appx
|
2021-06-01 23:14:02 +02:00
|
|
|
if-no-files-found: error
|
2020-09-30 19:21:16 +02:00
|
|
|
|
2021-01-26 04:16:19 +01:00
|
|
|
- name: Upload store appx ARM64 artifact
|
2021-06-07 18:00:13 +02:00
|
|
|
uses: actions/upload-artifact@ee69f02b3dfdecd58bb31b4d133da38ba6fe3700 # v2.2.3
|
2021-01-26 04:16:19 +01:00
|
|
|
with:
|
|
|
|
name: Bitwarden-${{ env.PACKAGE_VERSION }}-arm64-store.appx
|
|
|
|
path: ./dist/Bitwarden-${{ env.PACKAGE_VERSION }}-arm64-store.appx
|
2021-06-01 23:14:02 +02:00
|
|
|
if-no-files-found: error
|
2021-01-26 04:16:19 +01:00
|
|
|
|
2021-01-22 03:46:11 +01:00
|
|
|
- name: Upload nupkg artifact
|
2021-06-07 18:00:13 +02:00
|
|
|
uses: actions/upload-artifact@ee69f02b3dfdecd58bb31b4d133da38ba6fe3700 # v2.2.3
|
2021-01-22 03:46:11 +01:00
|
|
|
with:
|
|
|
|
name: bitwarden.${{ env.PACKAGE_VERSION }}.nupkg
|
|
|
|
path: ./dist/chocolatey/bitwarden.${{ env.PACKAGE_VERSION }}.nupkg
|
2021-06-01 23:14:02 +02:00
|
|
|
if-no-files-found: error
|
2021-01-22 03:46:11 +01:00
|
|
|
|
2021-06-07 18:00:13 +02:00
|
|
|
macos-build:
|
|
|
|
name: MacOS Build
|
2020-09-22 22:00:58 +02:00
|
|
|
runs-on: macos-latest
|
|
|
|
steps:
|
2021-06-07 18:00:13 +02:00
|
|
|
- name: Checkout repo
|
|
|
|
uses: actions/checkout@5a4ac9002d0be2fb38bd78e4b4dbde5606d7042f # v2.3.4
|
|
|
|
|
2020-09-24 21:51:17 +02:00
|
|
|
- name: Set up Node
|
2021-06-07 18:00:13 +02:00
|
|
|
uses: actions/setup-node@46071b5c7a2e0c34e49c3cb8a0e792e86e18d5ea # v2.1.5
|
2020-09-24 21:51:17 +02:00
|
|
|
with:
|
2021-05-18 15:21:26 +02:00
|
|
|
node-version: '14'
|
2020-09-24 21:51:17 +02:00
|
|
|
|
2021-06-07 18:00:13 +02:00
|
|
|
- name: Cache Node Modules
|
|
|
|
id: node-modules-cache
|
|
|
|
uses: actions/cache@c64c572235d810460d0d6876e9c705ad5002b353 # v2.1.6
|
|
|
|
with:
|
|
|
|
path: '**/node_modules'
|
|
|
|
key: ${{ runner.os }}-${{ github.run_id }}-node-${{ hashFiles('**/package-lock.json') }}
|
|
|
|
|
|
|
|
- name: Set Node options
|
|
|
|
run: echo "NODE_OPTIONS=--max_old_space_size=4096" >> $GITHUB_ENV
|
|
|
|
|
2021-05-26 22:44:48 +02:00
|
|
|
- name: Update NPM
|
|
|
|
run: |
|
|
|
|
npm install -g npm@7
|
|
|
|
npm install -g node-gyp
|
|
|
|
node-gyp install $(node -v)
|
|
|
|
|
2020-09-22 22:00:58 +02:00
|
|
|
- name: Print environment
|
|
|
|
run: |
|
2020-09-24 21:51:17 +02:00
|
|
|
node --version
|
|
|
|
npm --version
|
2021-05-18 15:21:26 +02:00
|
|
|
echo "GitHub ref: $GITHUB_REF"
|
|
|
|
echo "GitHub event: $GITHUB_EVENT"
|
2020-09-22 22:00:58 +02:00
|
|
|
|
2021-06-07 18:00:13 +02:00
|
|
|
- name: Cache Build
|
|
|
|
id: build-cache
|
|
|
|
uses: actions/cache@c64c572235d810460d0d6876e9c705ad5002b353 # v2.1.6
|
|
|
|
with:
|
|
|
|
path: build
|
|
|
|
key: ${{ runner.os }}-${{ github.run_id }}-build
|
|
|
|
|
|
|
|
- name: Cache Safari
|
|
|
|
id: safari-cache
|
|
|
|
uses: actions/cache@c64c572235d810460d0d6876e9c705ad5002b353 # v2.1.6
|
|
|
|
with:
|
|
|
|
path: dist-safari
|
|
|
|
key: ${{ runner.os }}-${{ github.run_id }}-safari-extension
|
2020-09-22 22:00:58 +02:00
|
|
|
|
|
|
|
- name: Decrypt secrets
|
|
|
|
run: ./.github/scripts/macos/decrypt-secrets.ps1
|
|
|
|
shell: pwsh
|
|
|
|
env:
|
|
|
|
DECRYPT_FILE_PASSWORD: ${{ secrets.DECRYPT_FILE_PASSWORD }}
|
|
|
|
|
|
|
|
- name: Set up keychain
|
|
|
|
run: ./.github/scripts/macos/setup-keychain.ps1
|
|
|
|
shell: pwsh
|
|
|
|
env:
|
|
|
|
KEYCHAIN_PASSWORD: ${{ secrets.KEYCHAIN_PASSWORD }}
|
|
|
|
DESKTOP_KEY_PASSWORD: ${{ secrets.DESKTOP_KEY_PASSWORD }}
|
|
|
|
DEVID_CERT_PASSWORD: ${{ secrets.DEVID_CERT_PASSWORD }}
|
|
|
|
APPSTORE_CERT_PASSWORD: ${{ secrets.APPSTORE_CERT_PASSWORD }}
|
2020-09-23 20:20:01 +02:00
|
|
|
MACDEV_CERT_PASSWORD: ${{ secrets.MACDEV_CERT_PASSWORD }}
|
2020-09-22 22:32:39 +02:00
|
|
|
APPLE_ID_PASSWORD: ${{ secrets.APPLE_ID_PASSWORD }}
|
2020-09-22 22:00:58 +02:00
|
|
|
|
|
|
|
- name: Set up provisioning profiles
|
|
|
|
run: ./.github/scripts/macos/setup-profiles.ps1
|
|
|
|
shell: pwsh
|
|
|
|
|
2020-09-24 18:17:41 +02:00
|
|
|
- name: Increment version
|
|
|
|
run: ./.github/scripts/macos/increment-version.ps1
|
|
|
|
shell: pwsh
|
|
|
|
|
|
|
|
- name: Load package version
|
|
|
|
run: ./.github/scripts/load-version.ps1
|
|
|
|
shell: pwsh
|
|
|
|
|
2020-09-22 22:19:17 +02:00
|
|
|
- name: Install Node dependencies
|
2021-06-07 18:00:13 +02:00
|
|
|
if: steps.node-modules-cache.outputs.cache-hit != 'true'
|
2020-09-22 22:19:17 +02:00
|
|
|
run: npm install
|
|
|
|
|
|
|
|
- name: Run linter
|
|
|
|
run: npm run lint
|
|
|
|
|
2021-06-07 18:00:13 +02:00
|
|
|
- name: Build application (dev)
|
|
|
|
run: npm run build
|
|
|
|
|
2020-09-24 18:17:41 +02:00
|
|
|
- name: Create Safari directory
|
2020-09-22 23:28:09 +02:00
|
|
|
shell: pwsh
|
2020-09-24 19:01:50 +02:00
|
|
|
run: New-Item ./dist-safari -ItemType Directory -ea 0
|
2020-09-22 23:28:09 +02:00
|
|
|
|
|
|
|
- name: Checkout browser extension
|
2021-06-07 18:00:13 +02:00
|
|
|
uses: actions/checkout@5a4ac9002d0be2fb38bd78e4b4dbde5606d7042f # v2.3.4
|
2020-09-22 23:28:09 +02:00
|
|
|
with:
|
|
|
|
repository: 'bitwarden/browser'
|
2020-09-24 19:21:15 +02:00
|
|
|
path: 'dist-safari/browser'
|
2020-09-22 23:28:09 +02:00
|
|
|
|
2020-09-24 18:17:41 +02:00
|
|
|
- name: Build Safari extension
|
|
|
|
shell: pwsh
|
|
|
|
run: ./scripts/safari-build.ps1 -skipcheckout -skipoutcopy
|
2020-09-22 22:00:58 +02:00
|
|
|
|
2021-06-07 18:00:13 +02:00
|
|
|
macos-package-github:
|
|
|
|
name: MacOS Package GitHub Release Assets
|
|
|
|
runs-on: macos-latest
|
|
|
|
needs: macos-build
|
|
|
|
if: github.ref == 'refs/heads/master' || github.ref == 'refs/heads/rc'
|
|
|
|
steps:
|
|
|
|
- name: Checkout repo
|
|
|
|
uses: actions/checkout@5a4ac9002d0be2fb38bd78e4b4dbde5606d7042f # v2.3.4
|
|
|
|
|
|
|
|
- name: Set up Node
|
|
|
|
uses: actions/setup-node@46071b5c7a2e0c34e49c3cb8a0e792e86e18d5ea # v2.1.5
|
|
|
|
with:
|
|
|
|
node-version: '14'
|
|
|
|
|
|
|
|
- name: Cache Node Modules
|
|
|
|
id: node-modules-cache
|
|
|
|
uses: actions/cache@c64c572235d810460d0d6876e9c705ad5002b353 # v2.1.6
|
|
|
|
with:
|
|
|
|
path: '**/node_modules'
|
|
|
|
key: ${{ runner.os }}-${{ github.run_id }}-node-${{ hashFiles('**/package-lock.json') }}
|
|
|
|
|
|
|
|
- name: Set Node options
|
|
|
|
run: echo "NODE_OPTIONS=--max_old_space_size=4096" >> $GITHUB_ENV
|
|
|
|
|
|
|
|
- name: Update NPM
|
|
|
|
run: |
|
|
|
|
npm install -g npm@7
|
|
|
|
npm install -g node-gyp
|
|
|
|
node-gyp install $(node -v)
|
|
|
|
|
|
|
|
- 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
|
|
|
|
uses: actions/cache@c64c572235d810460d0d6876e9c705ad5002b353 # v2.1.6
|
|
|
|
with:
|
|
|
|
path: build
|
|
|
|
key: ${{ runner.os }}-${{ github.run_id }}-build
|
|
|
|
|
|
|
|
- name: Setup Safari Cache
|
|
|
|
id: safari-cache
|
|
|
|
uses: actions/cache@c64c572235d810460d0d6876e9c705ad5002b353 # v2.1.6
|
|
|
|
with:
|
|
|
|
path: dist-safari
|
|
|
|
key: ${{ runner.os }}-${{ github.run_id }}-safari-extension
|
|
|
|
|
|
|
|
- name: Decrypt secrets
|
|
|
|
run: ./.github/scripts/macos/decrypt-secrets.ps1
|
2020-09-25 17:48:15 +02:00
|
|
|
shell: pwsh
|
2021-06-07 18:00:13 +02:00
|
|
|
env:
|
|
|
|
DECRYPT_FILE_PASSWORD: ${{ secrets.DECRYPT_FILE_PASSWORD }}
|
2020-09-25 17:48:15 +02:00
|
|
|
|
2021-06-07 18:00:13 +02:00
|
|
|
- name: Set up keychain
|
|
|
|
run: ./.github/scripts/macos/setup-keychain.ps1
|
|
|
|
shell: pwsh
|
|
|
|
env:
|
|
|
|
KEYCHAIN_PASSWORD: ${{ secrets.KEYCHAIN_PASSWORD }}
|
|
|
|
DESKTOP_KEY_PASSWORD: ${{ secrets.DESKTOP_KEY_PASSWORD }}
|
|
|
|
DEVID_CERT_PASSWORD: ${{ secrets.DEVID_CERT_PASSWORD }}
|
|
|
|
APPSTORE_CERT_PASSWORD: ${{ secrets.APPSTORE_CERT_PASSWORD }}
|
|
|
|
MACDEV_CERT_PASSWORD: ${{ secrets.MACDEV_CERT_PASSWORD }}
|
|
|
|
APPLE_ID_PASSWORD: ${{ secrets.APPLE_ID_PASSWORD }}
|
|
|
|
|
|
|
|
- name: Set up provisioning profiles
|
|
|
|
run: ./.github/scripts/macos/setup-profiles.ps1
|
|
|
|
shell: pwsh
|
|
|
|
|
|
|
|
- name: Increment version
|
|
|
|
run: ./.github/scripts/macos/increment-version.ps1
|
|
|
|
shell: pwsh
|
|
|
|
|
|
|
|
- name: Load package version
|
|
|
|
run: ./.github/scripts/load-version.ps1
|
|
|
|
shell: pwsh
|
|
|
|
|
|
|
|
- name: NPM install
|
|
|
|
if: steps.node-modules-cache.outputs.cache-hit != 'true'
|
|
|
|
run: npm install
|
|
|
|
|
|
|
|
- name: Build
|
|
|
|
if: steps.build-cache.outputs.cache-hit != 'true'
|
2020-09-25 17:48:15 +02:00
|
|
|
run: npm run build
|
|
|
|
|
2021-06-07 18:00:13 +02:00
|
|
|
- name: Create Safari directory
|
|
|
|
if: steps.safari-cache.outputs.cache-hit != 'true'
|
|
|
|
shell: pwsh
|
|
|
|
run: New-Item ./dist-safari -ItemType Directory -ea 0
|
|
|
|
|
|
|
|
- name: Checkout browser extension
|
|
|
|
if: steps.safari-cache.outputs.cache-hit != 'true'
|
|
|
|
uses: actions/checkout@5a4ac9002d0be2fb38bd78e4b4dbde5606d7042f # v2.3.4
|
|
|
|
with:
|
|
|
|
repository: 'bitwarden/browser'
|
|
|
|
path: 'dist-safari/browser'
|
|
|
|
ref: ${{ github.ref }}
|
|
|
|
|
|
|
|
- name: Build Safari extension
|
|
|
|
if: steps.safari-cache.outputs.cache-hit != 'true'
|
|
|
|
shell: pwsh
|
|
|
|
run: ./scripts/safari-build.ps1 -skipcheckout -skipoutcopy
|
|
|
|
|
|
|
|
- name: Load Safari extension for .dmg
|
|
|
|
shell: pwsh
|
|
|
|
run: ./scripts/safari-build.ps1 -copyonly
|
|
|
|
|
2020-09-28 18:18:09 +02:00
|
|
|
- name: Build application (dist)
|
2021-06-07 18:00:13 +02:00
|
|
|
run: |
|
|
|
|
npm run pack:mac
|
2020-09-25 17:48:15 +02:00
|
|
|
env:
|
|
|
|
APPLE_ID_USERNAME: ${{ secrets.APPLE_ID_USERNAME }}
|
|
|
|
APPLE_ID_PASSWORD: ${{ secrets.APPLE_ID_PASSWORD }}
|
|
|
|
|
|
|
|
- name: Upload .zip artifact
|
2021-06-07 18:00:13 +02:00
|
|
|
uses: actions/upload-artifact@ee69f02b3dfdecd58bb31b4d133da38ba6fe3700 # v2.2.3
|
2020-09-25 17:48:15 +02:00
|
|
|
with:
|
|
|
|
name: Bitwarden-${{ env.PACKAGE_VERSION }}-mac.zip
|
|
|
|
path: ./dist/Bitwarden-${{ env.PACKAGE_VERSION }}-mac.zip
|
2021-06-01 23:14:02 +02:00
|
|
|
if-no-files-found: error
|
2020-09-25 17:48:15 +02:00
|
|
|
|
|
|
|
- name: Upload .dmg artifact
|
2021-06-07 18:00:13 +02:00
|
|
|
uses: actions/upload-artifact@ee69f02b3dfdecd58bb31b4d133da38ba6fe3700 # v2.2.3
|
2020-09-25 17:48:15 +02:00
|
|
|
with:
|
|
|
|
name: Bitwarden-${{ env.PACKAGE_VERSION }}.dmg
|
|
|
|
path: ./dist/Bitwarden-${{ env.PACKAGE_VERSION }}.dmg
|
2021-06-01 23:14:02 +02:00
|
|
|
if-no-files-found: error
|
2020-09-24 18:17:41 +02:00
|
|
|
|
2021-06-07 18:00:13 +02:00
|
|
|
macos-package-mas:
|
|
|
|
name: MacOS Package Prod Release Asset
|
|
|
|
runs-on: macos-latest
|
|
|
|
needs: macos-build
|
|
|
|
if: github.ref == 'refs/heads/master' || github.ref == 'refs/heads/rc'
|
|
|
|
steps:
|
|
|
|
- name: Checkout repo
|
|
|
|
uses: actions/checkout@5a4ac9002d0be2fb38bd78e4b4dbde5606d7042f # v2.3.4
|
|
|
|
|
|
|
|
- name: Set up Node
|
|
|
|
uses: actions/setup-node@46071b5c7a2e0c34e49c3cb8a0e792e86e18d5ea # v2.1.5
|
|
|
|
with:
|
|
|
|
node-version: '14'
|
|
|
|
|
|
|
|
- name: Cache Node Modules
|
|
|
|
id: node-modules-cache
|
|
|
|
uses: actions/cache@c64c572235d810460d0d6876e9c705ad5002b353 # v2.1.6
|
|
|
|
with:
|
|
|
|
path: '**/node_modules'
|
|
|
|
key: ${{ runner.os }}-${{ github.run_id }}-node-${{ hashFiles('**/package-lock.json') }}
|
|
|
|
|
|
|
|
- name: Set Node options
|
|
|
|
run: echo "NODE_OPTIONS=--max_old_space_size=4096" >> $GITHUB_ENV
|
|
|
|
|
|
|
|
- name: Update NPM
|
|
|
|
run: |
|
|
|
|
npm install -g npm@7
|
|
|
|
npm install -g node-gyp
|
|
|
|
node-gyp install $(node -v)
|
|
|
|
|
|
|
|
- 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
|
|
|
|
uses: actions/cache@c64c572235d810460d0d6876e9c705ad5002b353 # v2.1.6
|
|
|
|
with:
|
|
|
|
path: build
|
|
|
|
key: ${{ runner.os }}-${{ github.run_id }}-build
|
|
|
|
|
|
|
|
- name: Setup Safari Cache
|
|
|
|
id: safari-cache
|
|
|
|
uses: actions/cache@c64c572235d810460d0d6876e9c705ad5002b353 # v2.1.6
|
|
|
|
with:
|
|
|
|
path: dist-safari
|
|
|
|
key: ${{ runner.os }}-${{ github.run_id }}-safari-extension
|
|
|
|
|
|
|
|
- name: Decrypt secrets
|
|
|
|
run: ./.github/scripts/macos/decrypt-secrets.ps1
|
|
|
|
shell: pwsh
|
|
|
|
env:
|
|
|
|
DECRYPT_FILE_PASSWORD: ${{ secrets.DECRYPT_FILE_PASSWORD }}
|
|
|
|
|
|
|
|
- name: Set up keychain
|
|
|
|
run: ./.github/scripts/macos/setup-keychain.ps1
|
|
|
|
shell: pwsh
|
|
|
|
env:
|
|
|
|
KEYCHAIN_PASSWORD: ${{ secrets.KEYCHAIN_PASSWORD }}
|
|
|
|
DESKTOP_KEY_PASSWORD: ${{ secrets.DESKTOP_KEY_PASSWORD }}
|
|
|
|
DEVID_CERT_PASSWORD: ${{ secrets.DEVID_CERT_PASSWORD }}
|
|
|
|
APPSTORE_CERT_PASSWORD: ${{ secrets.APPSTORE_CERT_PASSWORD }}
|
|
|
|
MACDEV_CERT_PASSWORD: ${{ secrets.MACDEV_CERT_PASSWORD }}
|
|
|
|
APPLE_ID_PASSWORD: ${{ secrets.APPLE_ID_PASSWORD }}
|
|
|
|
|
|
|
|
- name: Set up provisioning profiles
|
|
|
|
run: ./.github/scripts/macos/setup-profiles.ps1
|
|
|
|
shell: pwsh
|
|
|
|
|
|
|
|
- name: Increment version
|
|
|
|
run: ./.github/scripts/macos/increment-version.ps1
|
|
|
|
shell: pwsh
|
|
|
|
|
|
|
|
- name: Load package version
|
|
|
|
run: ./.github/scripts/load-version.ps1
|
|
|
|
shell: pwsh
|
|
|
|
|
|
|
|
- name: NPM install
|
|
|
|
if: steps.node-modules-cache.outputs.cache-hit != 'true'
|
|
|
|
run: npm install
|
|
|
|
|
|
|
|
- name: Build
|
|
|
|
if: steps.build-cache.outputs.cache-hit != 'true'
|
|
|
|
run: npm run build
|
|
|
|
|
|
|
|
- name: Create Safari directory
|
|
|
|
if: steps.safari-cache.outputs.cache-hit != 'true'
|
|
|
|
shell: pwsh
|
|
|
|
run: New-Item ./dist-safari -ItemType Directory -ea 0
|
|
|
|
|
|
|
|
- name: Checkout browser extension
|
|
|
|
if: steps.safari-cache.outputs.cache-hit != 'true'
|
|
|
|
uses: actions/checkout@5a4ac9002d0be2fb38bd78e4b4dbde5606d7042f # v2.3.4
|
|
|
|
with:
|
|
|
|
repository: 'bitwarden/browser'
|
|
|
|
path: 'dist-safari/browser'
|
|
|
|
ref: ${{ github.ref }}
|
|
|
|
|
|
|
|
- name: Build Safari extension
|
|
|
|
if: steps.safari-cache.outputs.cache-hit != 'true'
|
|
|
|
shell: pwsh
|
|
|
|
run: ./scripts/safari-build.ps1 -skipcheckout -skipoutcopy
|
|
|
|
|
2020-09-24 18:17:41 +02:00
|
|
|
- name: Load Safari extension for App Store
|
2020-09-22 23:14:07 +02:00
|
|
|
shell: pwsh
|
2020-09-24 18:17:41 +02:00
|
|
|
run: ./scripts/safari-build.ps1 -mas -copyonly
|
2020-09-22 22:00:58 +02:00
|
|
|
|
2020-09-28 18:18:09 +02:00
|
|
|
- name: Build application for App Store
|
2021-06-07 18:00:13 +02:00
|
|
|
run: |
|
|
|
|
npm run pack:mac:mas
|
2020-09-22 22:55:40 +02:00
|
|
|
env:
|
|
|
|
APPLE_ID_USERNAME: ${{ secrets.APPLE_ID_USERNAME }}
|
|
|
|
APPLE_ID_PASSWORD: ${{ secrets.APPLE_ID_PASSWORD }}
|
2021-05-28 19:38:09 +02:00
|
|
|
SDKROOT: /Library/Developer/CommandLineTools/SDKs/MacOSX11.1.sdk/
|
|
|
|
SDK_DIR: /Library/Developer/CommandLineTools/SDKs/MacOSX11.1.sdk/
|
2020-09-24 16:20:56 +02:00
|
|
|
|
2020-09-24 18:17:41 +02:00
|
|
|
- name: Upload .pkg artifact
|
2021-06-07 18:00:13 +02:00
|
|
|
uses: actions/upload-artifact@ee69f02b3dfdecd58bb31b4d133da38ba6fe3700 # v2.2.3
|
2020-09-24 18:17:41 +02:00
|
|
|
with:
|
2021-05-12 16:59:30 +02:00
|
|
|
name: Bitwarden-${{ env.PACKAGE_VERSION }}-universal.pkg
|
|
|
|
path: ./dist/mas-universal/Bitwarden-${{ env.PACKAGE_VERSION }}-universal.pkg
|
2021-06-01 23:14:02 +02:00
|
|
|
if-no-files-found: error
|
2021-06-07 18:00:13 +02:00
|
|
|
|
|
|
|
macos-package-dev:
|
|
|
|
name: MacOS Package Dev Release Asset
|
|
|
|
if: false # We need to look into how code signing works for dev
|
|
|
|
runs-on: macos-latest
|
|
|
|
needs: macos-build
|
|
|
|
steps:
|
|
|
|
- name: Checkout repo
|
|
|
|
uses: actions/checkout@5a4ac9002d0be2fb38bd78e4b4dbde5606d7042f # v2.3.4
|
|
|
|
|
|
|
|
- name: Set up Node
|
|
|
|
uses: actions/setup-node@46071b5c7a2e0c34e49c3cb8a0e792e86e18d5ea # v2.1.5
|
|
|
|
with:
|
|
|
|
node-version: '14'
|
|
|
|
|
|
|
|
- name: Cache Node Modules
|
|
|
|
id: node-modules-cache
|
|
|
|
uses: actions/cache@c64c572235d810460d0d6876e9c705ad5002b353 # v2.1.6
|
|
|
|
with:
|
|
|
|
path: '**/node_modules'
|
|
|
|
key: ${{ runner.os }}-${{ github.run_id }}-node-${{ hashFiles('**/package-lock.json') }}
|
|
|
|
|
|
|
|
- name: Set Node options
|
|
|
|
run: echo "NODE_OPTIONS=--max_old_space_size=4096" >> $GITHUB_ENV
|
|
|
|
|
|
|
|
- name: Update NPM
|
|
|
|
run: |
|
|
|
|
npm install -g npm@7
|
|
|
|
npm install -g node-gyp
|
|
|
|
node-gyp install $(node -v)
|
|
|
|
|
|
|
|
- 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
|
|
|
|
uses: actions/cache@c64c572235d810460d0d6876e9c705ad5002b353 # v2.1.6
|
|
|
|
with:
|
|
|
|
path: build
|
|
|
|
key: ${{ runner.os }}-${{ github.run_id }}-build
|
|
|
|
|
|
|
|
- name: Setup Safari Cache
|
|
|
|
id: safari-cache
|
|
|
|
uses: actions/cache@c64c572235d810460d0d6876e9c705ad5002b353 # v2.1.6
|
|
|
|
with:
|
|
|
|
path: dist-safari
|
|
|
|
key: ${{ runner.os }}-${{ github.run_id }}-safari-extension
|
|
|
|
|
|
|
|
- name: Decrypt secrets
|
|
|
|
run: ./.github/scripts/macos/decrypt-secrets.ps1
|
|
|
|
shell: pwsh
|
|
|
|
env:
|
|
|
|
DECRYPT_FILE_PASSWORD: ${{ secrets.DECRYPT_FILE_PASSWORD }}
|
|
|
|
|
|
|
|
- name: Set up keychain
|
|
|
|
run: ./.github/scripts/macos/setup-keychain.ps1
|
|
|
|
shell: pwsh
|
|
|
|
env:
|
|
|
|
KEYCHAIN_PASSWORD: ${{ secrets.KEYCHAIN_PASSWORD }}
|
|
|
|
DESKTOP_KEY_PASSWORD: ${{ secrets.DESKTOP_KEY_PASSWORD }}
|
|
|
|
DEVID_CERT_PASSWORD: ${{ secrets.DEVID_CERT_PASSWORD }}
|
|
|
|
APPSTORE_CERT_PASSWORD: ${{ secrets.APPSTORE_CERT_PASSWORD }}
|
|
|
|
MACDEV_CERT_PASSWORD: ${{ secrets.MACDEV_CERT_PASSWORD }}
|
|
|
|
APPLE_ID_PASSWORD: ${{ secrets.APPLE_ID_PASSWORD }}
|
|
|
|
|
|
|
|
- name: Set up provisioning profiles
|
|
|
|
run: ./.github/scripts/macos/setup-profiles.ps1
|
|
|
|
shell: pwsh
|
|
|
|
|
|
|
|
- name: Increment version
|
|
|
|
run: ./.github/scripts/macos/increment-version.ps1
|
|
|
|
shell: pwsh
|
|
|
|
|
|
|
|
- name: Load package version
|
|
|
|
run: ./.github/scripts/load-version.ps1
|
|
|
|
shell: pwsh
|
|
|
|
|
|
|
|
- name: NPM install
|
|
|
|
if: steps.node-modules-cache.outputs.cache-hit != 'true'
|
|
|
|
run: npm install
|
|
|
|
|
|
|
|
- name: Build
|
|
|
|
if: steps.build-cache.outputs.cache-hit != 'true'
|
|
|
|
run: npm run build
|
|
|
|
|
|
|
|
- name: Create Safari directory
|
|
|
|
if: steps.safari-cache.outputs.cache-hit != 'true'
|
|
|
|
shell: pwsh
|
|
|
|
run: New-Item ./dist-safari -ItemType Directory -ea 0
|
|
|
|
|
|
|
|
- name: Checkout browser extension
|
|
|
|
if: steps.safari-cache.outputs.cache-hit != 'true'
|
|
|
|
uses: actions/checkout@5a4ac9002d0be2fb38bd78e4b4dbde5606d7042f # v2.3.4
|
|
|
|
with:
|
|
|
|
repository: 'bitwarden/browser'
|
|
|
|
path: 'dist-safari/browser'
|
|
|
|
|
|
|
|
- name: Build Safari extension
|
|
|
|
if: steps.safari-cache.outputs.cache-hit != 'true'
|
|
|
|
shell: pwsh
|
|
|
|
run: ./scripts/safari-build.ps1 -skipcheckout -skipoutcopy
|
|
|
|
|
|
|
|
- name: Load Safari extension for App Store
|
|
|
|
shell: pwsh
|
|
|
|
run: ./scripts/safari-build.ps1 -masdev -copyonly
|
|
|
|
|
|
|
|
- name: Build dev application for App Store
|
|
|
|
run: |
|
|
|
|
npm run pack:mac:masdev
|
|
|
|
env:
|
|
|
|
APPLE_ID_USERNAME: ${{ secrets.APPLE_ID_USERNAME }}
|
|
|
|
APPLE_ID_PASSWORD: ${{ secrets.APPLE_ID_PASSWORD }}
|
|
|
|
SDKROOT: /Library/Developer/CommandLineTools/SDKs/MacOSX11.1.sdk/
|
|
|
|
SDK_DIR: /Library/Developer/CommandLineTools/SDKs/MacOSX11.1.sdk/
|
|
|
|
|
|
|
|
- name: Zip masdev asset
|
|
|
|
working-directory: ./dist/mas-dev-universal
|
|
|
|
run: |
|
|
|
|
zip -r Bitwarden-${{ env.PACKAGE_VERSION }}-masdev-universal.zip Bitwarden.app
|
|
|
|
|
|
|
|
- name: Upload masdev artifact
|
|
|
|
uses: actions/upload-artifact@ee69f02b3dfdecd58bb31b4d133da38ba6fe3700 # v2.2.3
|
|
|
|
with:
|
|
|
|
name: Bitwarden-${{ env.PACKAGE_VERSION }}-masdev-universal.zip
|
|
|
|
path: ./dist/mas-universal/Bitwarden-${{ env.PACKAGE_VERSION }}-masdev-universal.zip
|
|
|
|
if-no-files-found: error
|