From 65c5dc1f3b59b53e4251898a680a972d616d6ab1 Mon Sep 17 00:00:00 2001 From: Joseph Flinn Date: Tue, 5 Jan 2021 18:13:48 +0000 Subject: [PATCH 01/16] actually installing AST --- .github/workflows/build-and-sign.yml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/.github/workflows/build-and-sign.yml b/.github/workflows/build-and-sign.yml index 0fb892b1bc..d2238399dc 100644 --- a/.github/workflows/build-and-sign.yml +++ b/.github/workflows/build-and-sign.yml @@ -43,8 +43,15 @@ jobs: Write-Host "PACKAGE VERSION TO BUILD - $latest_version" Write-Host "--------" + dotnet restore + dotnet pact --output ./nupkg + dotnet tool install --global --ignore-failed-sources --add-source ./nupkg --version $latest_version azuresigntool + cd $HOME + - name: Test AST + run: azuresigntool sign --help + - name: Checkout repo uses: actions/checkout@v2 From c6ed8fe1d3d5f6919fb22a0c30b6a9601756a1e4 Mon Sep 17 00:00:00 2001 From: Joseph Flinn Date: Tue, 5 Jan 2021 18:17:58 +0000 Subject: [PATCH 02/16] fixing typo --- .github/workflows/build-and-sign.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build-and-sign.yml b/.github/workflows/build-and-sign.yml index d2238399dc..5fd8a2a1b2 100644 --- a/.github/workflows/build-and-sign.yml +++ b/.github/workflows/build-and-sign.yml @@ -44,7 +44,7 @@ jobs: Write-Host "--------" dotnet restore - dotnet pact --output ./nupkg + dotnet pack --output ./nupkg dotnet tool install --global --ignore-failed-sources --add-source ./nupkg --version $latest_version azuresigntool cd $HOME From 59efc3e09130dbfea8fb13dcc2881065061912e4 Mon Sep 17 00:00:00 2001 From: Joseph Flinn Date: Tue, 5 Jan 2021 18:53:40 +0000 Subject: [PATCH 03/16] testing signing with AZ key vault --- .github/workflows/build-and-sign.yml | 106 +++++++++++---------------- 1 file changed, 42 insertions(+), 64 deletions(-) diff --git a/.github/workflows/build-and-sign.yml b/.github/workflows/build-and-sign.yml index 5fd8a2a1b2..c32ef41754 100644 --- a/.github/workflows/build-and-sign.yml +++ b/.github/workflows/build-and-sign.yml @@ -6,6 +6,7 @@ on: jobs: windows: runs-on: windows-latest + environment: test steps: - name: Set up dotnet uses: actions/setup-dotnet@v1 @@ -56,9 +57,7 @@ jobs: uses: actions/checkout@v2 - name: Load package version - run: | - ./.github/scripts/load-version.ps1 - exit 1 + run: ./.github/scripts/load-version.ps1 shell: pwsh - name: Install Node dependencies @@ -68,67 +67,46 @@ jobs: run: npm run lint - name: Build application - shell: pwsh - run: npm run dist:win:ci - - - 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" + npm run build + npm run clean:dist - - name: Upload portable exe artifact - if: github.ref == 'refs/heads/master' || github.event_name == 'release' - uses: actions/upload-artifact@v2 - with: - name: Bitwarden-Portable-${{ env.PACKAGE_VERSION }}.exe - path: ./dist/Bitwarden-Portable-${{ env.PACKAGE_VERSION }}.exe - - - name: Upload installer exe artifact - if: github.ref == 'refs/heads/master' || github.event_name == 'release' - uses: actions/upload-artifact@v2 - with: - name: Bitwarden-Installer-${{ env.PACKAGE_VERSION }}.exe - path: ./dist/nsis-web/Bitwarden-Installer-${{ env.PACKAGE_VERSION }}.exe - - - name: Upload store appx ia32 artifact - if: github.ref == 'refs/heads/master' || github.event_name == 'release' - uses: actions/upload-artifact@v2 - with: - name: Bitwarden-${{ env.PACKAGE_VERSION }}-ia32-store.appx - path: ./dist/Bitwarden-${{ env.PACKAGE_VERSION }}-ia32-store.appx - - - name: Upload store appx x64 artifact - if: github.ref == 'refs/heads/master' || github.event_name == 'release' - uses: actions/upload-artifact@v2 - with: - name: Bitwarden-${{ env.PACKAGE_VERSION }}-x64-store.appx - path: ./dist/Bitwarden-${{ env.PACKAGE_VERSION }}-x64-store.appx - - - name: Deploy to Chocolatey - if: github.event_name == 'release' - run: ./scripts/choco-update.ps1 -version $env:PACKAGE_VERSION - shell: pwsh - - - name: Upload Chocolatey nupkg artifact - if: github.event_name == 'release' - uses: actions/upload-artifact@v2 - with: - name: bitwarden.${{ env.PACKAGE_VERSION }}.nupkg - path: ./dist/chocolatey/bitwarden.${{ env.PACKAGE_VERSION }}.nupkg - - - name: Upload release assets - if: github.event_name == 'release' - run: | - hub release edit ` - -a ./dist/chocolatey/bitwarden.${{ env.PACKAGE_VERSION }}.nupkg ` - -a ./dist/Bitwarden-${{ env.PACKAGE_VERSION }}-ia32-store.appx ` - -a ./dist/Bitwarden-${{ env.PACKAGE_VERSION }}-x64-store.appx ` - -m "$($env:RELEASE_TAG_NAME.TrimStart('v'))" ` - $env:RELEASE_TAG_NAME - shell: pwsh + - name: Build & Sign + run: electron-builder --win --x64 --ia32 -p never -c.win.certificateSubjectName=\"Bitwarden Inc\" env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - RELEASE_TAG_NAME: ${{ github.event.release.tag_name }} + CSC_LINK: ${{ secrets.EB_SIGNING_CERT_IDENTIFIER_URL }} + CSC_KEY_PASSWORD: ${{ secrets.EB_SIGNING_CERT_KEY }} + 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 }} + SECRET_TEST: ${{ secrets.SECRET_TEST }} + +#- name: Upload portable exe artifact +# if: github.ref == 'refs/heads/master' || github.event_name == 'release' +# uses: actions/upload-artifact@v2 +# with: +# name: Bitwarden-Portable-${{ env.PACKAGE_VERSION }}.exe +# path: ./dist/Bitwarden-Portable-${{ env.PACKAGE_VERSION }}.exe + +#- name: Upload installer exe artifact +# if: github.ref == 'refs/heads/master' || github.event_name == 'release' +# uses: actions/upload-artifact@v2 +# with: +# name: Bitwarden-Installer-${{ env.PACKAGE_VERSION }}.exe +# path: ./dist/nsis-web/Bitwarden-Installer-${{ env.PACKAGE_VERSION }}.exe + +#- name: Upload release assets +# if: github.event_name == 'release' +# run: | +# hub release edit ` +# -a ./dist/chocolatey/bitwarden.${{ env.PACKAGE_VERSION }}.nupkg ` +# -a ./dist/Bitwarden-${{ env.PACKAGE_VERSION }}-ia32-store.appx ` +# -a ./dist/Bitwarden-${{ env.PACKAGE_VERSION }}-x64-store.appx ` +# -m "$($env:RELEASE_TAG_NAME.TrimStart('v'))" ` +# $env:RELEASE_TAG_NAME +# shell: pwsh +# env: +# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} +# RELEASE_TAG_NAME: ${{ github.event.release.tag_name }} From cf738a2667ef365488ce7d969ce5f5321f10f2ea Mon Sep 17 00:00:00 2001 From: Joseph Flinn Date: Tue, 5 Jan 2021 19:04:25 +0000 Subject: [PATCH 04/16] adding the npx prefix to the electron-builder program --- .github/workflows/build-and-sign.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build-and-sign.yml b/.github/workflows/build-and-sign.yml index c32ef41754..b09d918fad 100644 --- a/.github/workflows/build-and-sign.yml +++ b/.github/workflows/build-and-sign.yml @@ -72,7 +72,7 @@ jobs: npm run clean:dist - name: Build & Sign - run: electron-builder --win --x64 --ia32 -p never -c.win.certificateSubjectName=\"Bitwarden Inc\" + run: npx electron-builder --win --x64 --ia32 -p never -c.win.certificateSubjectName=\"Bitwarden Inc\" env: CSC_LINK: ${{ secrets.EB_SIGNING_CERT_IDENTIFIER_URL }} CSC_KEY_PASSWORD: ${{ secrets.EB_SIGNING_CERT_KEY }} From bcc972e60b8bb1498aaebfa32a70154d967742aa Mon Sep 17 00:00:00 2001 From: Joseph Flinn Date: Tue, 5 Jan 2021 19:18:56 +0000 Subject: [PATCH 05/16] trying to switch to powershell for the electron-builder task --- .github/workflows/build-and-sign.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/build-and-sign.yml b/.github/workflows/build-and-sign.yml index b09d918fad..91fca6222b 100644 --- a/.github/workflows/build-and-sign.yml +++ b/.github/workflows/build-and-sign.yml @@ -72,6 +72,7 @@ jobs: npm run clean:dist - name: Build & Sign + shell: pwsh run: npx electron-builder --win --x64 --ia32 -p never -c.win.certificateSubjectName=\"Bitwarden Inc\" env: CSC_LINK: ${{ secrets.EB_SIGNING_CERT_IDENTIFIER_URL }} From 0cd63fa40076c56bec614a75aa66f441b84bc67b Mon Sep 17 00:00:00 2001 From: Joseph Flinn Date: Tue, 5 Jan 2021 19:28:00 +0000 Subject: [PATCH 06/16] removing the escape characters --- .github/workflows/build-and-sign.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/build-and-sign.yml b/.github/workflows/build-and-sign.yml index 91fca6222b..c59e5af9db 100644 --- a/.github/workflows/build-and-sign.yml +++ b/.github/workflows/build-and-sign.yml @@ -72,8 +72,7 @@ jobs: npm run clean:dist - name: Build & Sign - shell: pwsh - run: npx electron-builder --win --x64 --ia32 -p never -c.win.certificateSubjectName=\"Bitwarden Inc\" + run: npx electron-builder --win --x64 --ia32 -p never -c.win.certificateSubjectName="Bitwarden Inc" env: CSC_LINK: ${{ secrets.EB_SIGNING_CERT_IDENTIFIER_URL }} CSC_KEY_PASSWORD: ${{ secrets.EB_SIGNING_CERT_KEY }} From 38f357c1653ea1b383ab862eb87f8bff6c505826 Mon Sep 17 00:00:00 2001 From: Joseph Flinn Date: Tue, 5 Jan 2021 20:50:29 +0000 Subject: [PATCH 07/16] trying two single quotes and changing it back to pwsh --- .github/workflows/build-and-sign.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build-and-sign.yml b/.github/workflows/build-and-sign.yml index c59e5af9db..7d0854fea8 100644 --- a/.github/workflows/build-and-sign.yml +++ b/.github/workflows/build-and-sign.yml @@ -72,7 +72,8 @@ jobs: npm run clean:dist - name: Build & Sign - run: npx electron-builder --win --x64 --ia32 -p never -c.win.certificateSubjectName="Bitwarden Inc" + shell: pwsh + run: npx electron-builder --win --x64 --ia32 -p never -c.win.certificateSubjectName=''Bitwarden Inc'' env: CSC_LINK: ${{ secrets.EB_SIGNING_CERT_IDENTIFIER_URL }} CSC_KEY_PASSWORD: ${{ secrets.EB_SIGNING_CERT_KEY }} From fc0e8052b06e7d3c565af20a788e51586ccffb52 Mon Sep 17 00:00:00 2001 From: Joseph Flinn Date: Tue, 5 Jan 2021 21:03:07 +0000 Subject: [PATCH 08/16] trying to escape the quotes with back ticks --- .github/workflows/build-and-sign.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build-and-sign.yml b/.github/workflows/build-and-sign.yml index 7d0854fea8..9a1543e1ee 100644 --- a/.github/workflows/build-and-sign.yml +++ b/.github/workflows/build-and-sign.yml @@ -73,7 +73,10 @@ jobs: - name: Build & Sign shell: pwsh - run: npx electron-builder --win --x64 --ia32 -p never -c.win.certificateSubjectName=''Bitwarden Inc'' + run: | + $certName = "Bitwarden Inc" + npx electron-builder --win --x64 --ia32 -p never -c.win.certificateSubjectName=`"Bitwarden Inc`" + Write-Host "certName=$certName" env: CSC_LINK: ${{ secrets.EB_SIGNING_CERT_IDENTIFIER_URL }} CSC_KEY_PASSWORD: ${{ secrets.EB_SIGNING_CERT_KEY }} From fd89704c1d21b1dc1ca0cdfa3d2336f9cad7d1a9 Mon Sep 17 00:00:00 2001 From: Joseph Flinn Date: Tue, 5 Jan 2021 21:17:33 +0000 Subject: [PATCH 09/16] testing more escapes --- .github/workflows/build-and-sign.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build-and-sign.yml b/.github/workflows/build-and-sign.yml index 9a1543e1ee..ac5f1def21 100644 --- a/.github/workflows/build-and-sign.yml +++ b/.github/workflows/build-and-sign.yml @@ -75,8 +75,8 @@ jobs: shell: pwsh run: | $certName = "Bitwarden Inc" - npx electron-builder --win --x64 --ia32 -p never -c.win.certificateSubjectName=`"Bitwarden Inc`" - Write-Host "certName=$certName" + npx electron-builder --win --x64 --ia32 -p never -c.win.certificateSubjectName=\"Bitwarden Inc\" + Write-Host "certName=\"$certName\"" env: CSC_LINK: ${{ secrets.EB_SIGNING_CERT_IDENTIFIER_URL }} CSC_KEY_PASSWORD: ${{ secrets.EB_SIGNING_CERT_KEY }} From e31c8c0e79cd8ad40fad4f31814507aa121e29e8 Mon Sep 17 00:00:00 2001 From: Joseph Flinn Date: Tue, 5 Jan 2021 21:28:27 +0000 Subject: [PATCH 10/16] trying something else --- .github/workflows/build-and-sign.yml | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/.github/workflows/build-and-sign.yml b/.github/workflows/build-and-sign.yml index ac5f1def21..b4589f70e2 100644 --- a/.github/workflows/build-and-sign.yml +++ b/.github/workflows/build-and-sign.yml @@ -50,9 +50,6 @@ jobs: cd $HOME - - name: Test AST - run: azuresigntool sign --help - - name: Checkout repo uses: actions/checkout@v2 @@ -74,9 +71,9 @@ jobs: - name: Build & Sign shell: pwsh run: | - $certName = "Bitwarden Inc" - npx electron-builder --win --x64 --ia32 -p never -c.win.certificateSubjectName=\"Bitwarden Inc\" - Write-Host "certName=\"$certName\"" + $certName = "`u{22}Bitwarden Inc`u{22}" + npx electron-builder --win --x64 --ia32 -p never -c.win.certificateSubjectName=""""Bitwarden Inc"""" + Write-Host "certName=$certName" env: CSC_LINK: ${{ secrets.EB_SIGNING_CERT_IDENTIFIER_URL }} CSC_KEY_PASSWORD: ${{ secrets.EB_SIGNING_CERT_KEY }} From a1a5405722a45b1058b28ec720e36b1c2caa93e2 Mon Sep 17 00:00:00 2001 From: Joseph Flinn Date: Tue, 5 Jan 2021 21:38:20 +0000 Subject: [PATCH 11/16] one last thing before switching over to npm --- .github/workflows/build-and-sign.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build-and-sign.yml b/.github/workflows/build-and-sign.yml index b4589f70e2..f2c98a9e1a 100644 --- a/.github/workflows/build-and-sign.yml +++ b/.github/workflows/build-and-sign.yml @@ -72,7 +72,7 @@ jobs: shell: pwsh run: | $certName = "`u{22}Bitwarden Inc`u{22}" - npx electron-builder --win --x64 --ia32 -p never -c.win.certificateSubjectName=""""Bitwarden Inc"""" + npx electron-builder --win --x64 --ia32 -p never -c.win.certificateSubjectName="`u{22}Bitwarden Inc`u{22}" Write-Host "certName=$certName" env: CSC_LINK: ${{ secrets.EB_SIGNING_CERT_IDENTIFIER_URL }} From 078862e41bcb773102272ec6257c5f9cc7e83bb3 Mon Sep 17 00:00:00 2001 From: Joseph Flinn Date: Tue, 5 Jan 2021 21:53:46 +0000 Subject: [PATCH 12/16] switching over to an npm script --- .github/workflows/build-and-sign.yml | 10 +++------- package.json | 2 +- 2 files changed, 4 insertions(+), 8 deletions(-) diff --git a/.github/workflows/build-and-sign.yml b/.github/workflows/build-and-sign.yml index f2c98a9e1a..4f07d6ca25 100644 --- a/.github/workflows/build-and-sign.yml +++ b/.github/workflows/build-and-sign.yml @@ -64,16 +64,12 @@ jobs: run: npm run lint - name: Build application - run: | - npm run build - npm run clean:dist + run: npm run build - name: Build & Sign - shell: pwsh run: | - $certName = "`u{22}Bitwarden Inc`u{22}" - npx electron-builder --win --x64 --ia32 -p never -c.win.certificateSubjectName="`u{22}Bitwarden Inc`u{22}" - Write-Host "certName=$certName" + npm run build + npm run pack:win env: CSC_LINK: ${{ secrets.EB_SIGNING_CERT_IDENTIFIER_URL }} CSC_KEY_PASSWORD: ${{ secrets.EB_SIGNING_CERT_KEY }} diff --git a/package.json b/package.json index e1870315cb..6853efa81d 100644 --- a/package.json +++ b/package.json @@ -40,7 +40,7 @@ "pack:mac": "npm run clean:dist && electron-builder --mac -p never", "pack:mac:mas": "npm run clean:dist && electron-builder --mac mas -p never", "pack:mac:masdev": "npm run clean:dist && electron-builder --mac mas-dev -p never", - "pack:win": "npm run clean:dist && electron-builder --win --x64 --ia32 -p never -c.win.certificateSubjectName=\"8bit Solutions LLC\"", + "pack:win": "npm run clean:dist && electron-builder --win --x64 --ia32 -p never -c.win.certificateSubjectName=\"Bitwarden Inc\"", "pack:win:ci": "npm run clean:dist && electron-builder --win --x64 --ia32 -p never", "dist:dir": "npm run build && npm run pack:dir", "dist:lin": "npm run build && npm run pack:lin", From 902040ec64449dbdb53fe0b746bd14c05918f6f5 Mon Sep 17 00:00:00 2001 From: Joseph Flinn Date: Tue, 5 Jan 2021 22:18:26 +0000 Subject: [PATCH 13/16] making custom signing command easier to read --- sign.js | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/sign.js b/sign.js index 0a61edf3b7..e7a6df8909 100644 --- a/sign.js +++ b/sign.js @@ -1,10 +1,15 @@ exports.default = async function(configuration) { - //console.log(`config:\n${JSON.stringify(configuration, null, 4)}`) - console.log(`env test - secret test ${process.env.SECRET_TEST}`) - console.log(`env test - shouldn't work ${process.env.secretTest}`) - require("child_process").execSync( - `azuresigntool sign -kvu ${process.env.SIGNING_VAULT_URL} -kvi ${process.env.SIGNING_CLIENT_ID} -kvt ${process.env.SIGNING_TENANT_ID} -kvs ${process.env.SIGNING_CLIENT_SECRET} -kvc ${process.env.SIGNING_CERT_NAME} -fd ${configuration.hash} -du ${configuration.site} -tr http://timestamp.digicert.com ${configuration.path}`, + `azuresigntool sign ` + + `-kvu ${process.env.SIGNING_VAULT_URL} ` + + `-kvi ${process.env.SIGNING_CLIENT_ID} ` + + `-kvt ${process.env.SIGNING_TENANT_ID} ` + + `-kvs ${process.env.SIGNING_CLIENT_SECRET} ` + + `-kvc ${process.env.SIGNING_CERT_NAME} ` + + `-fd ${configuration.hash} ` + + `-du ${configuration.site} ` + + `-tr http://timestamp.digicert.com ` + + `${configuration.path}`, { stdio: "inherit" } From 7df3ded62a673594ab628473396dc3bdc45cc5ac Mon Sep 17 00:00:00 2001 From: Joseph Flinn Date: Tue, 5 Jan 2021 23:10:12 +0000 Subject: [PATCH 14/16] switching to a cert that should match --- .github/workflows/build-and-sign.yml | 5 ++++- package.json | 4 ++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build-and-sign.yml b/.github/workflows/build-and-sign.yml index 4f07d6ca25..a903f273c4 100644 --- a/.github/workflows/build-and-sign.yml +++ b/.github/workflows/build-and-sign.yml @@ -6,7 +6,7 @@ on: jobs: windows: runs-on: windows-latest - environment: test + environment: test_ast steps: - name: Set up dotnet uses: actions/setup-dotnet@v1 @@ -80,6 +80,9 @@ jobs: SIGNING_CERT_NAME: ${{ secrets.SIGNING_CERT_NAME }} SECRET_TEST: ${{ secrets.SECRET_TEST }} + - name: List Dist + run: dir ./dist + #- name: Upload portable exe artifact # if: github.ref == 'refs/heads/master' || github.event_name == 'release' # uses: actions/upload-artifact@v2 diff --git a/package.json b/package.json index 6853efa81d..4a1b2ce33c 100644 --- a/package.json +++ b/package.json @@ -40,7 +40,7 @@ "pack:mac": "npm run clean:dist && electron-builder --mac -p never", "pack:mac:mas": "npm run clean:dist && electron-builder --mac mas -p never", "pack:mac:masdev": "npm run clean:dist && electron-builder --mac mas-dev -p never", - "pack:win": "npm run clean:dist && electron-builder --win --x64 --ia32 -p never -c.win.certificateSubjectName=\"Bitwarden Inc\"", + "pack:win": "npm run clean:dist && electron-builder --win --x64 --ia32 -p never -c.win.certificateSubjectName=\"8bit Solutions LLC\"", "pack:win:ci": "npm run clean:dist && electron-builder --win --x64 --ia32 -p never", "dist:dir": "npm run build && npm run pack:dir", "dist:lin": "npm run build && npm run pack:lin", @@ -197,7 +197,7 @@ "applicationId": "bitwardendesktop", "identityName": "8bitSolutionsLLC.bitwardendesktop", "publisher": "CN=14D52771-DE3C-4886-B8BF-825BA7690418", - "publisherDisplayName": "8bit Solutions LLC", + "publisherDisplayName": "Bitwarden Inc", "languages": [ "en-US" ] From ba7007c307b357ebcdef3b28d6fd6fbc6584bbe1 Mon Sep 17 00:00:00 2001 From: Joseph Flinn Date: Wed, 6 Jan 2021 16:58:28 +0000 Subject: [PATCH 15/16] getting the correct artifacts uploaded to github --- .github/workflows/build-and-sign.yml | 38 +++++++++++++++++++--------- 1 file changed, 26 insertions(+), 12 deletions(-) diff --git a/.github/workflows/build-and-sign.yml b/.github/workflows/build-and-sign.yml index a903f273c4..c97c29e344 100644 --- a/.github/workflows/build-and-sign.yml +++ b/.github/workflows/build-and-sign.yml @@ -83,19 +83,33 @@ jobs: - name: List Dist run: dir ./dist -#- name: Upload portable exe artifact -# if: github.ref == 'refs/heads/master' || github.event_name == 'release' -# uses: actions/upload-artifact@v2 -# with: -# name: Bitwarden-Portable-${{ env.PACKAGE_VERSION }}.exe -# path: ./dist/Bitwarden-Portable-${{ env.PACKAGE_VERSION }}.exe + - name: Upload signed portable exe artifact + #if: github.ref == 'refs/heads/master' || github.event_name == 'release' + uses: actions/upload-artifact@v2 + with: + name: Bitwarden-Portable-${{ env.PACKAGE_VERSION }}-signed.exe + path: ./dist/Bitwarden-Portable-${{ env.PACKAGE_VERSION }}.exe -#- name: Upload installer exe artifact -# if: github.ref == 'refs/heads/master' || github.event_name == 'release' -# uses: actions/upload-artifact@v2 -# with: -# name: Bitwarden-Installer-${{ env.PACKAGE_VERSION }}.exe -# path: ./dist/nsis-web/Bitwarden-Installer-${{ env.PACKAGE_VERSION }}.exe + - name: Upload signed installer exe artifact + #if: github.ref == 'refs/heads/master' || github.event_name == 'release' + uses: actions/upload-artifact@v2 + with: + name: Bitwarden-Installer-${{ env.PACKAGE_VERSION }}-signed.exe + path: ./dist/nsis-web/Bitwarden-Installer-${{ env.PACKAGE_VERSION }}.exe + + - name: Upload signed appx ia32 artifact + #if: github.ref == 'refs/heads/master' || github.event_name == 'release' + uses: actions/upload-artifact@v2 + with: + name: Bitwarden-${{ env.PACKAGE_VERSION }}-ia32-signed.appx + path: ./dist/Bitwarden-${{ env.PACKAGE_VERSION }}-ia32.appx + + - name: Upload signed appx x64 artifact + #if: github.ref == 'refs/heads/master' || github.event_name == 'release' + uses: actions/upload-artifact@v2 + with: + name: Bitwarden-${{ env.PACKAGE_VERSION }}-x64-signed.appx + path: ./dist/Bitwarden-${{ env.PACKAGE_VERSION }}-x64.appx #- name: Upload release assets # if: github.event_name == 'release' From e1d2aa4b4a1ec93a0005d50fa3c31268b7e674b8 Mon Sep 17 00:00:00 2001 From: Joseph Flinn Date: Wed, 6 Jan 2021 17:25:33 +0000 Subject: [PATCH 16/16] changing the trigger for the Build --- .github/workflows/build-and-sign.yml | 4 +-- .github/workflows/build.yml | 51 +++++++++++++++------------- 2 files changed, 29 insertions(+), 26 deletions(-) diff --git a/.github/workflows/build-and-sign.yml b/.github/workflows/build-and-sign.yml index c97c29e344..fc29cf2670 100644 --- a/.github/workflows/build-and-sign.yml +++ b/.github/workflows/build-and-sign.yml @@ -101,14 +101,14 @@ jobs: #if: github.ref == 'refs/heads/master' || github.event_name == 'release' uses: actions/upload-artifact@v2 with: - name: Bitwarden-${{ env.PACKAGE_VERSION }}-ia32-signed.appx + name: Bitwarden-${{ env.PACKAGE_VERSION }}-ia32.appx path: ./dist/Bitwarden-${{ env.PACKAGE_VERSION }}-ia32.appx - name: Upload signed appx x64 artifact #if: github.ref == 'refs/heads/master' || github.event_name == 'release' uses: actions/upload-artifact@v2 with: - name: Bitwarden-${{ env.PACKAGE_VERSION }}-x64-signed.appx + name: Bitwarden-${{ env.PACKAGE_VERSION }}-x64.appx path: ./dist/Bitwarden-${{ env.PACKAGE_VERSION }}-x64.appx #- name: Upload release assets diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 8d8d61aa24..78e85b11bc 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -1,13 +1,16 @@ name: Build -on: - push: - branches-ignore: - - 'l10n_master' - - 'gh-pages' - release: - types: - - published +on: + workflow_dispatch: + +# on: +# push: +# branches-ignore: +# - 'l10n_master' +# - 'gh-pages' +# release: +# types: +# - published jobs: @@ -170,28 +173,28 @@ jobs: -Destination "./dist/Bitwarden-${{ env.PACKAGE_VERSION }}-x64-store.appx" - name: Upload portable exe artifact - if: github.ref == 'refs/heads/master' || github.event_name == 'release' + #if: github.ref == 'refs/heads/master' || github.event_name == 'release' uses: actions/upload-artifact@v2 with: name: Bitwarden-Portable-${{ env.PACKAGE_VERSION }}.exe path: ./dist/Bitwarden-Portable-${{ env.PACKAGE_VERSION }}.exe - name: Upload installer exe artifact - if: github.ref == 'refs/heads/master' || github.event_name == 'release' + #if: github.ref == 'refs/heads/master' || github.event_name == 'release' uses: actions/upload-artifact@v2 with: name: Bitwarden-Installer-${{ env.PACKAGE_VERSION }}.exe path: ./dist/nsis-web/Bitwarden-Installer-${{ env.PACKAGE_VERSION }}.exe - name: Upload store appx ia32 artifact - if: github.ref == 'refs/heads/master' || github.event_name == 'release' + #if: github.ref == 'refs/heads/master' || github.event_name == 'release' uses: actions/upload-artifact@v2 with: name: Bitwarden-${{ env.PACKAGE_VERSION }}-ia32-store.appx path: ./dist/Bitwarden-${{ env.PACKAGE_VERSION }}-ia32-store.appx - name: Upload store appx x64 artifact - if: github.ref == 'refs/heads/master' || github.event_name == 'release' + #if: github.ref == 'refs/heads/master' || github.event_name == 'release' uses: actions/upload-artifact@v2 with: name: Bitwarden-${{ env.PACKAGE_VERSION }}-x64-store.appx @@ -209,18 +212,18 @@ jobs: # name: bitwarden.${{ env.PACKAGE_VERSION }}.nupkg # path: ./dist/chocolatey/bitwarden.${{ env.PACKAGE_VERSION }}.nupkg - - name: Upload release assets - if: github.event_name == 'release' - run: | - hub release edit ` - -a ./dist/Bitwarden-${{ env.PACKAGE_VERSION }}-ia32-store.appx ` - -a ./dist/Bitwarden-${{ env.PACKAGE_VERSION }}-x64-store.appx ` - -m "$($env:RELEASE_TAG_NAME.TrimStart('v'))" ` - $env:RELEASE_TAG_NAME - shell: pwsh - env: - GITHUB_TOKEN: ${{ secrets.GH_TOKEN }} - RELEASE_TAG_NAME: ${{ github.event.release.tag_name }} + #- name: Upload release assets + # if: github.event_name == 'release' + # run: | + # hub release edit ` + # -a ./dist/Bitwarden-${{ env.PACKAGE_VERSION }}-ia32-store.appx ` + # -a ./dist/Bitwarden-${{ env.PACKAGE_VERSION }}-x64-store.appx ` + # -m "$($env:RELEASE_TAG_NAME.TrimStart('v'))" ` + # $env:RELEASE_TAG_NAME + # shell: pwsh + # env: + # GITHUB_TOKEN: ${{ secrets.GH_TOKEN }} + # RELEASE_TAG_NAME: ${{ github.event.release.tag_name }} macos: runs-on: macos-latest