1
0
mirror of https://github.com/bitwarden/desktop.git synced 2024-11-28 12:35:40 +01:00

moving the choco update script into the release pipeline and the build pipeline

This commit is contained in:
Joseph Flinn 2021-01-22 02:46:11 +00:00
parent de7ba57a10
commit ef7b1d9a19
2 changed files with 28 additions and 1 deletions

View File

@ -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:

View File

@ -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