From 2c4289918fd0bc4c7ae1015ca9480d711c4060ea Mon Sep 17 00:00:00 2001 From: Joseph Flinn Date: Fri, 22 Jan 2021 19:24:29 +0000 Subject: [PATCH 1/5] testing snap upload (kinda) --- .github/workflows/release.yml | 12 +++++++++--- package.json | 2 +- src/package.json | 2 +- 3 files changed, 11 insertions(+), 5 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index e889f15740..22f58355c9 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -54,8 +54,8 @@ jobs: - name: Install Snap uses: samuelmeuli/action-snapcraft@v1 - with: - snapcraft_token: ${{ secrets.SNAP_TOKEN }} + #with: + # snapcraft_token: ${{ secrets.SNAP_TOKEN }} - name: Print environment run: | @@ -82,14 +82,19 @@ jobs: env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + - name: List dist + run: ls -alth dist + - name: Deploy to Snap Store + shell: pwsh run: | snapcraft upload dist/bitwarden_${{ env.PACKAGE_VERSION }}_amd64.snap --release stable - snapcraft logout + #snapcraft logout windows: runs-on: windows-latest + if: false needs: setup steps: - name: Set up dotnet @@ -199,6 +204,7 @@ jobs: macos: runs-on: macos-latest + if: false needs: setup steps: - name: Set up Node diff --git a/package.json b/package.json index 4f4bac1ba8..eb6ec3af70 100644 --- a/package.json +++ b/package.json @@ -13,7 +13,7 @@ "homepage": "https://bitwarden.com", "repository": { "type": "git", - "url": "https://github.com/bitwarden/desktop" + "url": "https://github.com/joseph-flinn/desktop" }, "license": "GPL-3.0", "scripts": { diff --git a/src/package.json b/src/package.json index ec9c4904a6..0418f16b5a 100644 --- a/src/package.json +++ b/src/package.json @@ -9,7 +9,7 @@ "main": "main.js", "repository": { "type": "git", - "url": "https://github.com/bitwarden/desktop" + "url": "https://github.com/joseph-flinn/desktop" }, "dependencies": { "@nodert-win10-rs4/windows.security.credentials.ui": "^0.4.4", From 4c6282ddac96b627378ee0216ddfd44d03827eef Mon Sep 17 00:00:00 2001 From: Joseph Flinn Date: Sun, 24 Jan 2021 23:23:41 +0000 Subject: [PATCH 2/5] switching signing back to signing all .exe files and adding another job that doesn't sign the files for the Windows Store --- .github/workflows/release.yml | 81 ++++++++++++++++++++++++++++------- sign.js | 3 +- src/package.json | 2 +- 3 files changed, 68 insertions(+), 18 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 22f58355c9..7e7cce3904 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -37,6 +37,7 @@ jobs: linux: runs-on: ubuntu-latest + if: false needs: setup steps: - name: Set up Node @@ -92,9 +93,8 @@ jobs: #snapcraft logout - windows: + windows-signed: runs-on: windows-latest - if: false needs: setup steps: - name: Set up dotnet @@ -135,9 +135,9 @@ jobs: shell: pwsh run: | choco install checksum --no-progress - choco apikey --key $env:CHOCO_API_KEY --source https://push.chocolatey.org/ - env: - CHOCO_API_KEY: ${{ secrets.CHOCO_API_KEY }} + # choco apikey --key $env:CHOCO_API_KEY --source https://push.chocolatey.org/ + #env: + # CHOCO_API_KEY: ${{ secrets.CHOCO_API_KEY }} - name: Print environment run: | @@ -169,14 +169,6 @@ jobs: SIGNING_CERT_NAME: ${{ secrets.SIGNING_CERT_NAME }} 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 shell: pwsh run: | @@ -188,10 +180,9 @@ jobs: (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 cd ./dist/chocolatey - choco push + #choco push - name: Upload Chocolatey nupkg release asset - id: upload-macos-checksum uses: actions/upload-release-asset@v1 env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} @@ -202,6 +193,66 @@ jobs: 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: runs-on: macos-latest if: false diff --git a/sign.js b/sign.js index 107f048d46..9f8277c02f 100644 --- a/sign.js +++ b/sign.js @@ -1,8 +1,7 @@ exports.default = async function(configuration) { if ( parseInt(process.env.ELECTRON_BUILDER_SIGN) === 1 && - configuration.path.slice(-4) == ".exe" && - !(configuration.path.includes('win-unpacked') || configuration.path.includes('win-ia32-unpacked')) + configuration.path.slice(-4) == ".exe" ) { console.log(`[*] Signing file: ${configuration.path}`) require("child_process").execSync( diff --git a/src/package.json b/src/package.json index 0418f16b5a..4d7b5c9060 100644 --- a/src/package.json +++ b/src/package.json @@ -2,7 +2,7 @@ "name": "bitwarden", "productName": "Bitwarden", "description": "A secure and free password manager for all of your devices.", - "version": "1.24.1", + "version": "1.24.2-alpha", "author": "Bitwarden Inc. (https://bitwarden.com)", "homepage": "https://bitwarden.com", "license": "GPL-3.0", From cd2243976017ddbca1c808eeb0b1c997431f34df Mon Sep 17 00:00:00 2001 From: Joseph Flinn Date: Sun, 24 Jan 2021 23:37:52 +0000 Subject: [PATCH 3/5] adding in the environment --- .github/workflows/release.yml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 7e7cce3904..4db5b15e75 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -6,6 +6,9 @@ on: release_tag_name: description: 'Release Tag Name (vX.X.X)' required: true + browser_extension_ref: + description: 'Browser Extension ref (defaults to `master`):' + default: master jobs: @@ -95,6 +98,7 @@ jobs: windows-signed: runs-on: windows-latest + environment: prod needs: setup steps: - name: Set up dotnet @@ -323,6 +327,7 @@ jobs: uses: actions/checkout@v2 with: repository: 'bitwarden/browser' + ref: ${{ github.event.inputs.browser_extension_ref }} path: 'dist-safari/browser' - name: Build Safari extension From 2a408b4b2265ba4ff2c2416e295f0c6414b11c43 Mon Sep 17 00:00:00 2001 From: Joseph Flinn Date: Mon, 25 Jan 2021 00:08:44 +0000 Subject: [PATCH 4/5] removing testing code --- .github/workflows/release.yml | 17 +++++++---------- package.json | 2 +- src/package.json | 4 ++-- 3 files changed, 10 insertions(+), 13 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 4db5b15e75..f8f01282ff 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -40,7 +40,6 @@ jobs: linux: runs-on: ubuntu-latest - if: false needs: setup steps: - name: Set up Node @@ -58,8 +57,8 @@ jobs: - name: Install Snap uses: samuelmeuli/action-snapcraft@v1 - #with: - # snapcraft_token: ${{ secrets.SNAP_TOKEN }} + with: + snapcraft_token: ${{ secrets.SNAP_TOKEN }} - name: Print environment run: | @@ -93,12 +92,11 @@ jobs: shell: pwsh run: | snapcraft upload dist/bitwarden_${{ env.PACKAGE_VERSION }}_amd64.snap --release stable - #snapcraft logout + snapcraft logout windows-signed: runs-on: windows-latest - environment: prod needs: setup steps: - name: Set up dotnet @@ -139,9 +137,9 @@ jobs: shell: pwsh run: | choco install checksum --no-progress - # choco apikey --key $env:CHOCO_API_KEY --source https://push.chocolatey.org/ - #env: - # CHOCO_API_KEY: ${{ secrets.CHOCO_API_KEY }} + choco apikey --key $env:CHOCO_API_KEY --source https://push.chocolatey.org/ + env: + CHOCO_API_KEY: ${{ secrets.CHOCO_API_KEY }} - name: Print environment run: | @@ -184,7 +182,7 @@ jobs: (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 cd ./dist/chocolatey - #choco push + choco push - name: Upload Chocolatey nupkg release asset uses: actions/upload-release-asset@v1 @@ -259,7 +257,6 @@ jobs: macos: runs-on: macos-latest - if: false needs: setup steps: - name: Set up Node diff --git a/package.json b/package.json index eb6ec3af70..4f4bac1ba8 100644 --- a/package.json +++ b/package.json @@ -13,7 +13,7 @@ "homepage": "https://bitwarden.com", "repository": { "type": "git", - "url": "https://github.com/joseph-flinn/desktop" + "url": "https://github.com/bitwarden/desktop" }, "license": "GPL-3.0", "scripts": { diff --git a/src/package.json b/src/package.json index 4d7b5c9060..ec9c4904a6 100644 --- a/src/package.json +++ b/src/package.json @@ -2,14 +2,14 @@ "name": "bitwarden", "productName": "Bitwarden", "description": "A secure and free password manager for all of your devices.", - "version": "1.24.2-alpha", + "version": "1.24.1", "author": "Bitwarden Inc. (https://bitwarden.com)", "homepage": "https://bitwarden.com", "license": "GPL-3.0", "main": "main.js", "repository": { "type": "git", - "url": "https://github.com/joseph-flinn/desktop" + "url": "https://github.com/bitwarden/desktop" }, "dependencies": { "@nodert-win10-rs4/windows.security.credentials.ui": "^0.4.4", From 67a300dc1fdde1a656ca0a825e683f5b2668248f Mon Sep 17 00:00:00 2001 From: Joseph Flinn Date: Mon, 25 Jan 2021 00:20:34 +0000 Subject: [PATCH 5/5] removing more testing code --- .github/workflows/release.yml | 4 ---- 1 file changed, 4 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index f8f01282ff..bd251d3dbd 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -85,11 +85,7 @@ jobs: env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - - name: List dist - run: ls -alth dist - - name: Deploy to Snap Store - shell: pwsh run: | snapcraft upload dist/bitwarden_${{ env.PACKAGE_VERSION }}_amd64.snap --release stable snapcraft logout