moving the choco update script into the release pipeline and the build pipeline
This commit is contained in:
parent
de7ba57a10
commit
ef7b1d9a19
|
@ -184,6 +184,17 @@ jobs:
|
||||||
Copy-Item "./dist/Bitwarden-${{ env.PACKAGE_VERSION }}-x64.appx" `
|
Copy-Item "./dist/Bitwarden-${{ env.PACKAGE_VERSION }}-x64.appx" `
|
||||||
-Destination "./dist/Bitwarden-${{ env.PACKAGE_VERSION }}-x64-store.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
|
- name: Upload portable exe artifact
|
||||||
if: github.ref == 'refs/heads/master'
|
if: github.ref == 'refs/heads/master'
|
||||||
uses: actions/upload-artifact@v2
|
uses: actions/upload-artifact@v2
|
||||||
|
@ -212,6 +223,13 @@ jobs:
|
||||||
name: Bitwarden-${{ env.PACKAGE_VERSION }}-x64-store.appx
|
name: Bitwarden-${{ env.PACKAGE_VERSION }}-x64-store.appx
|
||||||
path: ./dist/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:
|
macos:
|
||||||
runs-on: macos-latest
|
runs-on: macos-latest
|
||||||
steps:
|
steps:
|
||||||
|
|
|
@ -259,7 +259,16 @@ jobs:
|
||||||
|
|
||||||
- name: Deploy to Chocolatey
|
- name: Deploy to Chocolatey
|
||||||
shell: pwsh
|
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
|
- name: Upload Chocolatey nupkg release asset
|
||||||
id: upload-macos-checksum
|
id: upload-macos-checksum
|
||||||
|
|
Loading…
Reference in New Issue