1
0
mirror of https://github.com/bitwarden/browser synced 2025-12-18 17:23:37 +00:00

switching signing back to signing all .exe files and adding another job that doesn't sign the files for the Windows Store

This commit is contained in:
Joseph Flinn
2021-01-24 23:23:41 +00:00
parent 2c4289918f
commit 4c6282ddac
3 changed files with 68 additions and 18 deletions

View File

@@ -37,6 +37,7 @@ jobs:
linux: linux:
runs-on: ubuntu-latest runs-on: ubuntu-latest
if: false
needs: setup needs: setup
steps: steps:
- name: Set up Node - name: Set up Node
@@ -92,9 +93,8 @@ jobs:
#snapcraft logout #snapcraft logout
windows: windows-signed:
runs-on: windows-latest runs-on: windows-latest
if: false
needs: setup needs: setup
steps: steps:
- name: Set up dotnet - name: Set up dotnet
@@ -135,9 +135,9 @@ jobs:
shell: pwsh shell: pwsh
run: | run: |
choco install checksum --no-progress choco install checksum --no-progress
choco apikey --key $env:CHOCO_API_KEY --source https://push.chocolatey.org/ # choco apikey --key $env:CHOCO_API_KEY --source https://push.chocolatey.org/
env: #env:
CHOCO_API_KEY: ${{ secrets.CHOCO_API_KEY }} # CHOCO_API_KEY: ${{ secrets.CHOCO_API_KEY }}
- name: Print environment - name: Print environment
run: | run: |
@@ -169,14 +169,6 @@ jobs:
SIGNING_CERT_NAME: ${{ secrets.SIGNING_CERT_NAME }} SIGNING_CERT_NAME: ${{ secrets.SIGNING_CERT_NAME }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- 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"
- name: Deploy to Chocolatey - name: Deploy to Chocolatey
shell: pwsh shell: pwsh
run: | run: |
@@ -188,10 +180,9 @@ jobs:
(Get-Content $chocoInstall).replace('__version__', "$env:PACKAGE_VERSION").replace('__checksum__', $checksum) | Set-Content $chocoInstall (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 choco pack ./dist/chocolatey/bitwarden.nuspec --version "$env:PACKAGE_VERSION" --out ./dist/chocolatey
cd ./dist/chocolatey cd ./dist/chocolatey
choco push #choco push
- name: Upload Chocolatey nupkg release asset - name: Upload Chocolatey nupkg release asset
id: upload-macos-checksum
uses: actions/upload-release-asset@v1 uses: actions/upload-release-asset@v1
env: env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
@@ -202,6 +193,66 @@ jobs:
asset_content_type: application asset_content_type: application
windows-store:
runs-on: windows-latest
needs: setup
steps:
- name: Set up Node
uses: actions/setup-node@v1
with:
node-version: '10.x'
- name: Set Node options
run: echo "NODE_OPTIONS=--max_old_space_size=4096" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
shell: pwsh
- name: Set up environment
shell: pwsh
run: |
choco install checksum --no-progress
- name: Print environment
run: |
node --version
npm --version
choco --version
- name: Checkout repo
uses: actions/checkout@v2
- name: Load package version
run: ./.github/scripts/load-version.ps1
shell: pwsh
- name: Install Node dependencies
run: npm install
- name: Run linter
run: npm run lint
- name: Build, Sign & Release
run: npm run dist:win:ci
- name: Upload unsigned ia32 Windows Store release asset
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ needs.setup.outputs.release_upload_url }}
asset_name: Bitwarden-${{ env.PACKAGE_VERSION }}-ia32-store.appx
asset_path: ./dist/Bitwarden-${{ env.PACKAGE_VERSION }}-ia32.appx
asset_content_type: application
- name: Upload unsigned x64 Windows Store release asset
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ needs.setup.outputs.release_upload_url }}
asset_name: Bitwarden-${{ env.PACKAGE_VERSION }}-x64-store.appx
asset_path: ./dist/Bitwarden-${{ env.PACKAGE_VERSION }}-x64.appx
asset_content_type: application
macos: macos:
runs-on: macos-latest runs-on: macos-latest
if: false if: false

View File

@@ -1,8 +1,7 @@
exports.default = async function(configuration) { exports.default = async function(configuration) {
if ( if (
parseInt(process.env.ELECTRON_BUILDER_SIGN) === 1 && parseInt(process.env.ELECTRON_BUILDER_SIGN) === 1 &&
configuration.path.slice(-4) == ".exe" && configuration.path.slice(-4) == ".exe"
!(configuration.path.includes('win-unpacked') || configuration.path.includes('win-ia32-unpacked'))
) { ) {
console.log(`[*] Signing file: ${configuration.path}`) console.log(`[*] Signing file: ${configuration.path}`)
require("child_process").execSync( require("child_process").execSync(

View File

@@ -2,7 +2,7 @@
"name": "bitwarden", "name": "bitwarden",
"productName": "Bitwarden", "productName": "Bitwarden",
"description": "A secure and free password manager for all of your devices.", "description": "A secure and free password manager for all of your devices.",
"version": "1.24.1", "version": "1.24.2-alpha",
"author": "Bitwarden Inc. <hello@bitwarden.com> (https://bitwarden.com)", "author": "Bitwarden Inc. <hello@bitwarden.com> (https://bitwarden.com)",
"homepage": "https://bitwarden.com", "homepage": "https://bitwarden.com",
"license": "GPL-3.0", "license": "GPL-3.0",