From c4b5f8a88b5e12880fa566349debef11ddda9775 Mon Sep 17 00:00:00 2001 From: Joseph Flinn Date: Thu, 21 Jan 2021 23:02:22 +0000 Subject: [PATCH 01/15] switching over to the provided action to upload release assets --- .github/workflows/release.yml | 221 ++++++++++++++++++---------------- package.json | 2 +- src/package.json | 4 +- 3 files changed, 122 insertions(+), 105 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 0e19f9e6c5e..4133c5fd1b3 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -7,6 +7,7 @@ on: description: 'Release Tag Name (vX.X.X)' required: true + jobs: cloc: runs-on: ubuntu-latest @@ -23,8 +24,36 @@ jobs: - name: Print lines of code run: cloc --include-lang TypeScript,JavaScript,HTML,Sass,CSS --vcs git + + setup: + runs-on: ubuntu-latest + outputs: + release_upload_url: ${{ steps.create_release.outputs.upload_url }} + steps: + - name: Checkout repo + uses: actions/checkout@v2 + + - name: Create Release Name + run: | + echo "RELEASE_NAME=${RELEASE_TAG_NAME:1}" >> $GITHUB_ENV + env: + RELEASE_TAG_NAME: ${{ github.event.inputs.release_tag_name }} + + - name: Create Draft Release + id: create_release + uses: actions/create-release@v1 + env: + GITHUB_TOKEN: ${{ secrets.GH_TOKEN }} + with: + tag_name: ${{ github.event.inputs.release_tag_name }} + release_name: ${{ env.RELEASE_NAME }} + draft: true + prerelease: false + + linux: runs-on: ubuntu-latest + needs: setup steps: - name: Set up Node uses: actions/setup-node@v1 @@ -42,9 +71,9 @@ jobs: - name: Set up snap run: | sudo snap install snapcraft --classic - echo "$SNAP_TOKEN" | snapcraft login --with - - env: - SNAP_TOKEN: ${{ secrets.SNAP_TOKEN }} + # echo "$SNAP_TOKEN" | snapcraft login --with - + #env: + # SNAP_TOKEN: ${{ secrets.SNAP_TOKEN }} - name: Print environment run: | @@ -69,41 +98,62 @@ jobs: - name: Build application run: npm run dist:lin - - name: Upload .deb artifact - uses: actions/upload-artifact@v2 + - name: Upload .deb release asset + uses: actions/upload-release-asset@v1 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} with: - name: Bitwarden-${{ env.PACKAGE_VERSION }}-amd64.deb - path: ./dist/Bitwarden-${{ env.PACKAGE_VERSION }}-amd64.deb + upload_url: ${{ needs.setup.outputs.release_upload_url }} + asset_name: Bitwarden-${{ env.PACKAGE_VERSION }}-amd64.deb + asset_path: ./dist/Bitwarden-${{ env.PACKAGE_VERSION }}-amd64.deb + asset_content_type: application/x-debian-package - - name: Upload .rpm artifact - uses: actions/upload-artifact@v2 + - name: Upload .rpm release asset + uses: actions/upload-release-asset@v1 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} with: - name: Bitwarden-${{ env.PACKAGE_VERSION }}-x86_64.rpm - path: ./dist/Bitwarden-${{ env.PACKAGE_VERSION }}-x86_64.rpm + upload_url: ${{ needs.setup.outputs.release_upload_url }} + asset_name: Bitwarden-${{ env.PACKAGE_VERSION }}-x86_64.rpm + asset_path: ./dist/Bitwarden-${{ env.PACKAGE_VERSION }}-x86_64.rpm + asset_content_type: application - - name: Upload .freebsd artifact - uses: actions/upload-artifact@v2 + - name: Upload .freebsd release asset + uses: actions/upload-release-asset@v1 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} with: - name: Bitwarden-${{ env.PACKAGE_VERSION }}-x64.freebsd - path: ./dist/Bitwarden-${{ env.PACKAGE_VERSION }}-x64.freebsd + upload_url: ${{ needs.setup.outputs.release_upload_url }} + asset_name: Bitwarden-${{ env.PACKAGE_VERSION }}-x64.freebsd + asset_path: ./dist/Bitwarden-${{ env.PACKAGE_VERSION }}-x64.freebsd + asset_content_type: application - - name: Upload .snap artifact - uses: actions/upload-artifact@v2 + - name: Upload .snap checksum release asset + uses: actions/upload-release-asset@v1 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} with: - name: bitwarden_${{ env.PACKAGE_VERSION }}_amd64.snap - path: ./dist/bitwarden_${{ env.PACKAGE_VERSION }}_amd64.snap + upload_url: ${{ needs.setup.outputs.release_upload_url }} + asset_name: bitwarden_${{ env.PACKAGE_VERSION }}_amd64.snap + asset_path: ./dist/bitwarden_${{ env.PACKAGE_VERSION }}_amd64.snap + asset_content_type: application - - name: Upload .AppImage artifact - uses: actions/upload-artifact@v2 + - name: Upload .AppImage checksum release asset + uses: actions/upload-release-asset@v1 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} with: - name: Bitwarden-${{ env.PACKAGE_VERSION }}-x86_64.AppImage - path: ./dist/Bitwarden-${{ env.PACKAGE_VERSION }}-x86_64.AppImage + upload_url: ${{ needs.setup.outputs.release_upload_url }} + asset_name: Bitwarden-${{ env.PACKAGE_VERSION }}-x86_64.AppImage + asset_path: ./dist/Bitwarden-${{ env.PACKAGE_VERSION }}-x86_64.AppImage + asset_content_type: application + + #- name: Deploy to Snap Store + # run: | + # ./scripts/snap-update.ps1 -version $env:PACKAGE_VERSION + # snapcraft logout + # shell: pwsh - - name: Deploy to Snap Store - run: | - ./scripts/snap-update.ps1 -version $env:PACKAGE_VERSION - snapcraft logout - shell: pwsh windows: runs-on: windows-latest @@ -146,9 +196,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: | @@ -188,51 +238,17 @@ jobs: Copy-Item "./dist/Bitwarden-${{ env.PACKAGE_VERSION }}-x64.appx" ` -Destination "./dist/Bitwarden-${{ env.PACKAGE_VERSION }}-x64-store.appx" - - name: Upload portable exe artifact - 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 - 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 - 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 - 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 - run: ./scripts/choco-update.ps1 -version $env:PACKAGE_VERSION - shell: pwsh - - - name: Upload Chocolatey nupkg artifact - uses: actions/upload-artifact@v2 - with: - name: bitwarden.${{ env.PACKAGE_VERSION }}.nupkg - path: ./dist/chocolatey/bitwarden.${{ env.PACKAGE_VERSION }}.nupkg - - - name: Upload release assets - 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 + - name: Upload Chocolatey nupkg release asset + id: upload-macos-checksum + uses: actions/upload-release-asset@v1 env: - GITHUB_TOKEN: ${{ secrets.GH_TOKEN }} - RELEASE_TAG_NAME: ${{ github.event.inputs.release_tag_name }} + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + upload_url: ${{ needs.setup.outputs.release_upload_url }} + asset_name: bitwarden.${{ env.PACKAGE_VERSION }}.nupkg + asset_path: ./dist/chocolatey/bitwarden.${{ env.PACKAGE_VERSION }}.nupkg + asset_content_type: text/plain + macos: runs-on: macos-latest @@ -318,18 +334,6 @@ jobs: APPLE_ID_USERNAME: ${{ secrets.APPLE_ID_USERNAME }} APPLE_ID_PASSWORD: ${{ secrets.APPLE_ID_PASSWORD }} - - name: Upload .zip artifact - uses: actions/upload-artifact@v2 - with: - name: Bitwarden-${{ env.PACKAGE_VERSION }}-mac.zip - path: ./dist/Bitwarden-${{ env.PACKAGE_VERSION }}-mac.zip - - - name: Upload .dmg artifact - uses: actions/upload-artifact@v2 - with: - name: Bitwarden-${{ env.PACKAGE_VERSION }}.dmg - path: ./dist/Bitwarden-${{ env.PACKAGE_VERSION }}.dmg - - name: Load Safari extension for App Store shell: pwsh run: ./scripts/safari-build.ps1 -mas -copyonly @@ -340,25 +344,38 @@ jobs: APPLE_ID_USERNAME: ${{ secrets.APPLE_ID_USERNAME }} APPLE_ID_PASSWORD: ${{ secrets.APPLE_ID_PASSWORD }} - - name: Upload .pkg artifact - uses: actions/upload-artifact@v2 - with: - name: Bitwarden-${{ env.PACKAGE_VERSION }}.pkg - path: ./dist/mas/Bitwarden-${{ env.PACKAGE_VERSION }}.pkg - - name: Deploy to App Store run: npm run upload:mas env: APPLE_ID_USERNAME: ${{ secrets.APPLE_ID_USERNAME }} APPLE_ID_PASSWORD: ${{ secrets.APPLE_ID_PASSWORD }} - - name: Upload release assets - run: | - hub release edit ` - -a ./dist/mas/Bitwarden-${{ env.PACKAGE_VERSION }}.pkg ` - -m "$($env:RELEASE_TAG_NAME.TrimStart('v'))" ` - $env:RELEASE_TAG_NAME - shell: pwsh + - name: Upload .pkg release asset + uses: actions/upload-release-asset@v1 env: - GITHUB_TOKEN: ${{ secrets.GH_TOKEN }} - RELEASE_TAG_NAME: ${{ github.event.inputs.release_tag_name }} + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + upload_url: ${{ needs.setup.outputs.release_upload_url }} + asset_name: Bitwarden-${{ env.PACKAGE_VERSION }}.pkg + asset_path: ./dist/mas/Bitwarden-${{ env.PACKAGE_VERSION }}.pkg + asset_content_type: text/plain + + - name: Upload zip 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 }}-mac.zip + asset_path: ./dist/Bitwarden-${{ env.PACKAGE_VERSION }}-mac.zip + asset_content_type: text/plain + + - name: Upload .dmg 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 }}.dmg + asset_path: ./dist/Bitwarden-${{ env.PACKAGE_VERSION }}.dmg + asset_content_type: text/plain diff --git a/package.json b/package.json index e1870315cb4..45cc2b611fc 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 781a491dc03..0ecc4c17070 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.23.1", + "version": "1.23.4-alpha", "author": "Bitwarden Inc. (https://bitwarden.com)", "homepage": "https://bitwarden.com", "license": "GPL-3.0", "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 8b56129dcd3de806ea1ce795dc30ff726c31678a Mon Sep 17 00:00:00 2001 From: Joseph Flinn Date: Thu, 21 Jan 2021 23:06:32 +0000 Subject: [PATCH 02/15] updating the content types --- .github/workflows/release.yml | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 4133c5fd1b3..649a2874c52 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -157,6 +157,7 @@ jobs: windows: runs-on: windows-latest + needs: setup steps: - name: Set up dotnet uses: actions/setup-dotnet@v1 @@ -247,11 +248,12 @@ jobs: upload_url: ${{ needs.setup.outputs.release_upload_url }} asset_name: bitwarden.${{ env.PACKAGE_VERSION }}.nupkg asset_path: ./dist/chocolatey/bitwarden.${{ env.PACKAGE_VERSION }}.nupkg - asset_content_type: text/plain + asset_content_type: application macos: runs-on: macos-latest + needs: setup steps: - name: Set up Node uses: actions/setup-node@v1 @@ -358,7 +360,7 @@ jobs: upload_url: ${{ needs.setup.outputs.release_upload_url }} asset_name: Bitwarden-${{ env.PACKAGE_VERSION }}.pkg asset_path: ./dist/mas/Bitwarden-${{ env.PACKAGE_VERSION }}.pkg - asset_content_type: text/plain + asset_content_type: application/vnd.apple.installer+xml - name: Upload zip release asset uses: actions/upload-release-asset@v1 @@ -368,7 +370,7 @@ jobs: upload_url: ${{ needs.setup.outputs.release_upload_url }} asset_name: Bitwarden-${{ env.PACKAGE_VERSION }}-mac.zip asset_path: ./dist/Bitwarden-${{ env.PACKAGE_VERSION }}-mac.zip - asset_content_type: text/plain + asset_content_type: application/zip - name: Upload .dmg release asset uses: actions/upload-release-asset@v1 @@ -378,4 +380,4 @@ jobs: upload_url: ${{ needs.setup.outputs.release_upload_url }} asset_name: Bitwarden-${{ env.PACKAGE_VERSION }}.dmg asset_path: ./dist/Bitwarden-${{ env.PACKAGE_VERSION }}.dmg - asset_content_type: text/plain + asset_content_type: application/x-apple-diskimage From f908b1a7b25ce7ee57f02739470aab849f0325a1 Mon Sep 17 00:00:00 2001 From: Joseph Flinn Date: Thu, 21 Jan 2021 23:23:03 +0000 Subject: [PATCH 03/15] trying the linux publish and different windows setup --- .github/workflows/release.yml | 24 +++++++++++++++++++++--- 1 file changed, 21 insertions(+), 3 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 649a2874c52..3e8573dc54d 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -95,10 +95,17 @@ jobs: - name: Run linter run: npm run lint + - name: Build & Publish + run: npm run publish:lin + env: + GITHUB_TOKEN: ${{ secrets.GH_TOKEN }} + - name: Build application + if: false run: npm run dist:lin - name: Upload .deb release asset + if: false uses: actions/upload-release-asset@v1 env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} @@ -109,6 +116,7 @@ jobs: asset_content_type: application/x-debian-package - name: Upload .rpm release asset + if: false uses: actions/upload-release-asset@v1 env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} @@ -119,6 +127,7 @@ jobs: asset_content_type: application - name: Upload .freebsd release asset + if: false uses: actions/upload-release-asset@v1 env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} @@ -129,6 +138,7 @@ jobs: asset_content_type: application - name: Upload .snap checksum release asset + if: false uses: actions/upload-release-asset@v1 env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} @@ -139,6 +149,7 @@ jobs: asset_content_type: application - name: Upload .AppImage checksum release asset + if: false uses: actions/upload-release-asset@v1 env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} @@ -193,13 +204,19 @@ jobs: dotnet pack --output ./nupkg dotnet tool install --global --ignore-failed-sources --add-source ./nupkg --version $latest_version azuresigntool + - name: Set up environment + if: false + 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 }} + - name: Set up environment 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 }} - name: Print environment run: | @@ -252,6 +269,7 @@ jobs: macos: + if: false runs-on: macos-latest needs: setup steps: From 58a830fc83fa84deb2c35557932e073178553eab Mon Sep 17 00:00:00 2001 From: Joseph Flinn Date: Thu, 21 Jan 2021 23:47:36 +0000 Subject: [PATCH 04/15] adding in the environment for windows signing --- .github/workflows/release.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 3e8573dc54d..877a943c8fe 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -168,6 +168,7 @@ jobs: windows: runs-on: windows-latest + environment: prod needs: setup steps: - name: Set up dotnet From de7ba57a1011b37d8b38b57745de40a15ae2b9c7 Mon Sep 17 00:00:00 2001 From: Joseph Flinn Date: Fri, 22 Jan 2021 00:13:04 +0000 Subject: [PATCH 05/15] fixing the chocolatey issue --- .github/workflows/release.yml | 4 ++++ scripts/choco-update.ps1 | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 877a943c8fe..db38a1107b0 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -257,6 +257,10 @@ jobs: 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: ./scripts/choco-update.ps1 -version $env:PACKAGE_VERSION + - name: Upload Chocolatey nupkg release asset id: upload-macos-checksum uses: actions/upload-release-asset@v1 diff --git a/scripts/choco-update.ps1 b/scripts/choco-update.ps1 index 72677357aaa..4e2496581ec 100644 --- a/scripts/choco-update.ps1 +++ b/scripts/choco-update.ps1 @@ -30,5 +30,5 @@ $chocoInstall = $distChocoDir + "\tools\chocolateyinstall.ps1"; (Get-Content $chocoInstall).replace('__version__', $version).replace('__checksum__', $checksum) | Set-Content $chocoInstall choco pack $nuspec --version $version --out $distChocoDir cd $distChocoDir -choco push +#choco push cd $rootDir From ef7b1d9a19a4d0bada649bf5658f4d79c59b3d60 Mon Sep 17 00:00:00 2001 From: Joseph Flinn Date: Fri, 22 Jan 2021 02:46:11 +0000 Subject: [PATCH 06/15] moving the choco update script into the release pipeline and the build pipeline --- .github/workflows/build.yml | 18 ++++++++++++++++++ .github/workflows/release.yml | 11 ++++++++++- 2 files changed, 28 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 1ce0a04f964..7e7e89c5b39 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -184,6 +184,17 @@ jobs: 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: | + Copy-Item -Path ./stores/chocolatey -Destination ./chocolatey -Recurse + Copy-Item -Path ./dist/Bitwarden-Installer-${{ env.PACKAGE_VERSION }}.exe -Destination ./chocolatey + + $checksum = checksum -t sha256 ./chocoloatey/Bitwarden-Installer-${{ env.PACKAGE_VERSION }}.exe + $chocoInstall = "./chocolatey/tools/chocolateyinstall.ps1" + (Get-Content $chocoInstall).replace('__version__', ${{ env.PACKAGE_VERSION }}).replace('__checksum__', $checksum) | Set-Content $chocoInstall + choco pack ./chocolatey/bitwarden.nuspec --version ${{ env.PACKAGE_VERSION }} --out ./chocolately + - name: Upload portable exe artifact if: github.ref == 'refs/heads/master' uses: actions/upload-artifact@v2 @@ -212,6 +223,13 @@ jobs: name: Bitwarden-${{ env.PACKAGE_VERSION }}-x64-store.appx path: ./dist/Bitwarden-${{ env.PACKAGE_VERSION }}-x64-store.appx + - name: Upload nupkg artifact + if: github.ref == 'refs/heads/master' + uses: actions/upload-artifact@v2 + with: + name: bitwarden.${{ env.PACKAGE_VERSION }}.nupkg + path: ./dist/chocolatey/bitwarden.${{ env.PACKAGE_VERSION }}.nupkg + macos: runs-on: macos-latest steps: diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index db38a1107b0..7a5912cf211 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -259,7 +259,16 @@ jobs: - name: Deploy to Chocolatey shell: pwsh - run: ./scripts/choco-update.ps1 -version $env:PACKAGE_VERSION + run: | + Copy-Item -Path ./stores/chocolatey -Destination ./dist/chocolatey -Recurse + Copy-Item -Path ./dist/Bitwarden-Installer-${{ env.PACKAGE_VERSION }}.exe -Destination ./dist/chocolatey + + $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/chocolately + cd ./dist/chocolately + #choco push - name: Upload Chocolatey nupkg release asset id: upload-macos-checksum From 9c4a6bfbb67640441b344a39d4e4bf5c973acde9 Mon Sep 17 00:00:00 2001 From: Joseph Flinn Date: Fri, 22 Jan 2021 03:13:54 +0000 Subject: [PATCH 07/15] fixing the package version to be a string --- .github/workflows/release.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 7a5912cf211..e816371db6b 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -265,8 +265,8 @@ jobs: $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/chocolately + (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/chocolately cd ./dist/chocolately #choco push From 6909a09a34c4799ee909f3e7974a4d9cb44211c7 Mon Sep 17 00:00:00 2001 From: Joseph Flinn Date: Fri, 22 Jan 2021 03:30:34 +0000 Subject: [PATCH 08/15] fixing path --- .github/workflows/release.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index e816371db6b..a1cca2dd6ac 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -261,7 +261,7 @@ jobs: shell: pwsh run: | Copy-Item -Path ./stores/chocolatey -Destination ./dist/chocolatey -Recurse - Copy-Item -Path ./dist/Bitwarden-Installer-${{ env.PACKAGE_VERSION }}.exe -Destination ./dist/chocolatey + Copy-Item -Path ./dist/nsis-web/Bitwarden-Installer-${{ env.PACKAGE_VERSION }}.exe -Destination ./dist/chocolatey $checksum = checksum -t sha256 ./dist/chocoloatey/Bitwarden-Installer-${{ env.PACKAGE_VERSION }}.exe $chocoInstall = "./dist/chocolatey/tools/chocolateyinstall.ps1" From 13c9148e24d5038f0c6f6a16efbe62e20c725b80 Mon Sep 17 00:00:00 2001 From: Joseph Flinn Date: Fri, 22 Jan 2021 03:52:04 +0000 Subject: [PATCH 09/15] debugging code --- .github/workflows/release.yml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index a1cca2dd6ac..ea925cd0ed1 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -257,12 +257,17 @@ jobs: Copy-Item "./dist/Bitwarden-${{ env.PACKAGE_VERSION }}-x64.appx" ` -Destination "./dist/Bitwarden-${{ env.PACKAGE_VERSION }}-x64-store.appx" + - name: List Dir + run: ls ./dist + - name: Deploy to Chocolatey shell: pwsh 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 + ls ./dist + $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 From dbb7ca43361c5bfa77c84fefbe84c68f77688936 Mon Sep 17 00:00:00 2001 From: Joseph Flinn Date: Fri, 22 Jan 2021 04:12:47 +0000 Subject: [PATCH 10/15] more debugging --- .github/workflows/release.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index ea925cd0ed1..93f4b1634e9 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -266,7 +266,7 @@ jobs: Copy-Item -Path ./stores/chocolatey -Destination ./dist/chocolatey -Recurse Copy-Item -Path ./dist/nsis-web/Bitwarden-Installer-${{ env.PACKAGE_VERSION }}.exe -Destination ./dist/chocolatey - ls ./dist + ls ./dist/chocolatey $checksum = checksum -t sha256 ./dist/chocoloatey/Bitwarden-Installer-${{ env.PACKAGE_VERSION }}.exe $chocoInstall = "./dist/chocolatey/tools/chocolateyinstall.ps1" From 68babd624339bb49d4c9cb11c2e24f030da89768 Mon Sep 17 00:00:00 2001 From: Joseph Flinn Date: Fri, 22 Jan 2021 04:30:06 +0000 Subject: [PATCH 11/15] fixing typo --- .github/workflows/release.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 93f4b1634e9..36072260a69 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -271,8 +271,8 @@ jobs: $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/chocolately - cd ./dist/chocolately + choco pack ./dist/chocolatey/bitwarden.nuspec --version "$env:PACKAGE_VERSION" --out ./dist/chocolatey + cd ./dist/chocolatey #choco push - name: Upload Chocolatey nupkg release asset From 56bf4d66bace0bbb6cebf0c6fcf98e99c704db89 Mon Sep 17 00:00:00 2001 From: Joseph Flinn Date: Fri, 22 Jan 2021 04:49:35 +0000 Subject: [PATCH 12/15] removing debugging code --- .github/workflows/release.yml | 5 ----- 1 file changed, 5 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 36072260a69..334097cf19a 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -257,17 +257,12 @@ jobs: Copy-Item "./dist/Bitwarden-${{ env.PACKAGE_VERSION }}-x64.appx" ` -Destination "./dist/Bitwarden-${{ env.PACKAGE_VERSION }}-x64-store.appx" - - name: List Dir - run: ls ./dist - - name: Deploy to Chocolatey shell: pwsh 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 - ls ./dist/chocolatey - $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 From a1559faefb0242ca4db796b91c8ce679dd736cde Mon Sep 17 00:00:00 2001 From: Joseph Flinn Date: Fri, 22 Jan 2021 04:53:28 +0000 Subject: [PATCH 13/15] reverting all of the testing code --- .github/workflows/build.yml | 12 +++--- .github/workflows/release.yml | 79 +++-------------------------------- package.json | 2 +- scripts/choco-update.ps1 | 2 +- 4 files changed, 14 insertions(+), 81 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 7e7e89c5b39..95817329a56 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -187,13 +187,13 @@ jobs: - name: Deploy to Chocolatey shell: pwsh run: | - Copy-Item -Path ./stores/chocolatey -Destination ./chocolatey -Recurse - Copy-Item -Path ./dist/Bitwarden-Installer-${{ env.PACKAGE_VERSION }}.exe -Destination ./chocolatey + 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 ./chocoloatey/Bitwarden-Installer-${{ env.PACKAGE_VERSION }}.exe - $chocoInstall = "./chocolatey/tools/chocolateyinstall.ps1" - (Get-Content $chocoInstall).replace('__version__', ${{ env.PACKAGE_VERSION }}).replace('__checksum__', $checksum) | Set-Content $chocoInstall - choco pack ./chocolatey/bitwarden.nuspec --version ${{ env.PACKAGE_VERSION }} --out ./chocolately + $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 - name: Upload portable exe artifact if: github.ref == 'refs/heads/master' diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 334097cf19a..2800cc537cb 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -100,75 +100,15 @@ jobs: env: GITHUB_TOKEN: ${{ secrets.GH_TOKEN }} - - name: Build application - if: false - run: npm run dist:lin - - - name: Upload .deb release asset - if: false - 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 }}-amd64.deb - asset_path: ./dist/Bitwarden-${{ env.PACKAGE_VERSION }}-amd64.deb - asset_content_type: application/x-debian-package - - - name: Upload .rpm release asset - if: false - 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 }}-x86_64.rpm - asset_path: ./dist/Bitwarden-${{ env.PACKAGE_VERSION }}-x86_64.rpm - asset_content_type: application - - - name: Upload .freebsd release asset - if: false - 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.freebsd - asset_path: ./dist/Bitwarden-${{ env.PACKAGE_VERSION }}-x64.freebsd - asset_content_type: application - - - name: Upload .snap checksum release asset - if: false - 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 }}_amd64.snap - asset_path: ./dist/bitwarden_${{ env.PACKAGE_VERSION }}_amd64.snap - asset_content_type: application - - - name: Upload .AppImage checksum release asset - if: false - 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 }}-x86_64.AppImage - asset_path: ./dist/Bitwarden-${{ env.PACKAGE_VERSION }}-x86_64.AppImage - asset_content_type: application - - #- name: Deploy to Snap Store - # run: | - # ./scripts/snap-update.ps1 -version $env:PACKAGE_VERSION - # snapcraft logout - # shell: pwsh + - name: Deploy to Snap Store + run: | + ./scripts/snap-update.ps1 -version $env:PACKAGE_VERSION + snapcraft logout + shell: pwsh windows: runs-on: windows-latest - environment: prod needs: setup steps: - name: Set up dotnet @@ -206,7 +146,6 @@ jobs: dotnet tool install --global --ignore-failed-sources --add-source ./nupkg --version $latest_version azuresigntool - name: Set up environment - if: false shell: pwsh run: | choco install checksum --no-progress @@ -214,11 +153,6 @@ jobs: env: CHOCO_API_KEY: ${{ secrets.CHOCO_API_KEY }} - - name: Set up environment - shell: pwsh - run: | - choco install checksum --no-progress - - name: Print environment run: | node --version @@ -268,7 +202,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 id: upload-macos-checksum @@ -283,7 +217,6 @@ jobs: macos: - if: false runs-on: macos-latest needs: setup steps: diff --git a/package.json b/package.json index 45cc2b611fc..e1870315cb4 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/scripts/choco-update.ps1 b/scripts/choco-update.ps1 index 4e2496581ec..72677357aaa 100644 --- a/scripts/choco-update.ps1 +++ b/scripts/choco-update.ps1 @@ -30,5 +30,5 @@ $chocoInstall = $distChocoDir + "\tools\chocolateyinstall.ps1"; (Get-Content $chocoInstall).replace('__version__', $version).replace('__checksum__', $checksum) | Set-Content $chocoInstall choco pack $nuspec --version $version --out $distChocoDir cd $distChocoDir -#choco push +choco push cd $rootDir From 6b0c4114f76b19ed9778b4bab2434ecaa9503351 Mon Sep 17 00:00:00 2001 From: Joseph Flinn Date: Fri, 22 Jan 2021 04:55:28 +0000 Subject: [PATCH 14/15] removing commented out code --- .github/workflows/release.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 2800cc537cb..b95b4417eb1 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -71,9 +71,9 @@ jobs: - name: Set up snap run: | sudo snap install snapcraft --classic - # echo "$SNAP_TOKEN" | snapcraft login --with - - #env: - # SNAP_TOKEN: ${{ secrets.SNAP_TOKEN }} + echo "$SNAP_TOKEN" | snapcraft login --with - + env: + SNAP_TOKEN: ${{ secrets.SNAP_TOKEN }} - name: Print environment run: | From 1fb9e41bcfb9aad38aac6d7d68a8ba13770b206f Mon Sep 17 00:00:00 2001 From: Joseph Flinn Date: Fri, 22 Jan 2021 04:56:58 +0000 Subject: [PATCH 15/15] more reverting --- src/package.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/package.json b/src/package.json index 0ecc4c17070..781a491dc03 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.23.4-alpha", + "version": "1.23.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",