Devops 829 Add electron beta channels (#2838)
* Add option for beta channels in package.json for electron * Change placement of build settings * Add version * Revert "Add version" This reverts commit2e09cc7d5e
. * Add electron version to package.json * Move build to higher level * Add upload beta autoupdate * Revert version * Updating the release workflow with the new channels * restrict GitHub Release to only 'latest' * fixing electron-builder configuration * version bump test * fixing words * Commenting out the npm cache in the windows build job * Adding back in the caching for the future * Revert "version bump test" This reverts commitb732d00841
. Co-authored-by: Joseph Flinn <joseph.s.flinn@gmail.com>
This commit is contained in:
parent
a22c6c55ed
commit
bd6cdf3aa3
|
@ -64,6 +64,7 @@ jobs:
|
||||||
runs-on: ubuntu-20.04
|
runs-on: ubuntu-20.04
|
||||||
outputs:
|
outputs:
|
||||||
package_version: ${{ steps.retrieve-version.outputs.package_version }}
|
package_version: ${{ steps.retrieve-version.outputs.package_version }}
|
||||||
|
release_channel: ${{ steps.release-channel.outputs.channel }}
|
||||||
build_number: ${{ steps.increment-version.outputs.build_number }}
|
build_number: ${{ steps.increment-version.outputs.build_number }}
|
||||||
rc_branch_exists: ${{ steps.branch-check.outputs.rc_branch_exists }}
|
rc_branch_exists: ${{ steps.branch-check.outputs.rc_branch_exists }}
|
||||||
hotfix_branch_exists: ${{ steps.branch-check.outputs.hotfix_branch_exists }}
|
hotfix_branch_exists: ${{ steps.branch-check.outputs.hotfix_branch_exists }}
|
||||||
|
@ -87,6 +88,23 @@ jobs:
|
||||||
echo "Setting build number to $BUILD_NUMBER"
|
echo "Setting build number to $BUILD_NUMBER"
|
||||||
echo "::set-output name=build_number::$BUILD_NUMBER"
|
echo "::set-output name=build_number::$BUILD_NUMBER"
|
||||||
|
|
||||||
|
- name: Get Version Channel
|
||||||
|
id: release-channel
|
||||||
|
run: |
|
||||||
|
case "${{ steps.retrieve-version.outputs.package_version }}" in
|
||||||
|
*"alpha"*)
|
||||||
|
echo "::set-output name=channel::alpha"
|
||||||
|
echo "[!] We do not yet support 'alpha'"
|
||||||
|
exit 1
|
||||||
|
;;
|
||||||
|
*"beta"*)
|
||||||
|
echo "::set-output name=channel::beta"
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
echo "::set-output name=channel::latest"
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
|
||||||
- name: Check if special branches exist
|
- name: Check if special branches exist
|
||||||
id: branch-check
|
id: branch-check
|
||||||
run: |
|
run: |
|
||||||
|
@ -188,11 +206,11 @@ jobs:
|
||||||
path: apps/desktop/dist/Bitwarden-${{ env._PACKAGE_VERSION }}-x86_64.AppImage
|
path: apps/desktop/dist/Bitwarden-${{ env._PACKAGE_VERSION }}-x86_64.AppImage
|
||||||
if-no-files-found: error
|
if-no-files-found: error
|
||||||
|
|
||||||
- name: Upload latest auto-update artifact
|
- name: Upload auto-update artifact
|
||||||
uses: actions/upload-artifact@6673cd052c4cd6fcf4b4e6e60ea986c889389535
|
uses: actions/upload-artifact@6673cd052c4cd6fcf4b4e6e60ea986c889389535
|
||||||
with:
|
with:
|
||||||
name: latest-linux.yml
|
name: ${{ needs.setup.outputs.release_channel }}-linux.yml
|
||||||
path: apps/desktop/dist/latest-linux.yml
|
path: apps/desktop/dist/${{ needs.setup.outputs.release_channel }}-linux.yml
|
||||||
if-no-files-found: error
|
if-no-files-found: error
|
||||||
|
|
||||||
|
|
||||||
|
@ -373,11 +391,11 @@ jobs:
|
||||||
path: apps/desktop/dist/chocolatey/bitwarden.${{ env._PACKAGE_VERSION }}.nupkg
|
path: apps/desktop/dist/chocolatey/bitwarden.${{ env._PACKAGE_VERSION }}.nupkg
|
||||||
if-no-files-found: error
|
if-no-files-found: error
|
||||||
|
|
||||||
- name: Upload latest auto-update artifact
|
- name: Upload auto-update artifact
|
||||||
uses: actions/upload-artifact@6673cd052c4cd6fcf4b4e6e60ea986c889389535
|
uses: actions/upload-artifact@6673cd052c4cd6fcf4b4e6e60ea986c889389535
|
||||||
with:
|
with:
|
||||||
name: latest.yml
|
name: ${{ needs.setup.outputs.release_channel }}.yml
|
||||||
path: apps/desktop/dist/nsis-web/latest.yml
|
path: apps/desktop/dist/nsis-web/${{ needs.setup.outputs.release_channel }}.yml
|
||||||
if-no-files-found: error
|
if-no-files-found: error
|
||||||
|
|
||||||
|
|
||||||
|
@ -704,11 +722,11 @@ jobs:
|
||||||
path: apps/desktop/dist/Bitwarden-${{ env._PACKAGE_VERSION }}-universal.dmg.blockmap
|
path: apps/desktop/dist/Bitwarden-${{ env._PACKAGE_VERSION }}-universal.dmg.blockmap
|
||||||
if-no-files-found: error
|
if-no-files-found: error
|
||||||
|
|
||||||
- name: Upload latest auto-update artifact
|
- name: Upload auto-update artifact
|
||||||
uses: actions/upload-artifact@6673cd052c4cd6fcf4b4e6e60ea986c889389535
|
uses: actions/upload-artifact@6673cd052c4cd6fcf4b4e6e60ea986c889389535
|
||||||
with:
|
with:
|
||||||
name: latest-mac.yml
|
name: ${{ needs.setup.outputs.release_channel }}-mac.yml
|
||||||
path: apps/desktop/dist/latest-mac.yml
|
path: apps/desktop/dist/${{ needs.setup.outputs.release_channel }}-mac.yml
|
||||||
if-no-files-found: error
|
if-no-files-found: error
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -23,6 +23,7 @@ jobs:
|
||||||
runs-on: ubuntu-20.04
|
runs-on: ubuntu-20.04
|
||||||
outputs:
|
outputs:
|
||||||
release-version: ${{ steps.version.outputs.version }}
|
release-version: ${{ steps.version.outputs.version }}
|
||||||
|
release-channel: ${{ steps.release-channel.outputs.channel }}
|
||||||
branch-name: ${{ steps.branch.outputs.branch-name }}
|
branch-name: ${{ steps.branch.outputs.branch-name }}
|
||||||
steps:
|
steps:
|
||||||
- name: Branch check
|
- name: Branch check
|
||||||
|
@ -48,6 +49,23 @@ jobs:
|
||||||
monorepo: true
|
monorepo: true
|
||||||
monorepo-project: desktop
|
monorepo-project: desktop
|
||||||
|
|
||||||
|
- name: Get Version Channel
|
||||||
|
id: release-channel
|
||||||
|
run: |
|
||||||
|
case "${{ steps.version.outputs.version }}" in
|
||||||
|
*"alpha"*)
|
||||||
|
echo "::set-output name=channel::alpha"
|
||||||
|
echo "[!] We do not yet support 'alpha'"
|
||||||
|
exit 1
|
||||||
|
;;
|
||||||
|
*"beta"*)
|
||||||
|
echo "::set-output name=channel::beta"
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
echo "::set-output name=channel::latest"
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
|
||||||
- name: Get branch name
|
- name: Get branch name
|
||||||
id: branch
|
id: branch
|
||||||
run: |
|
run: |
|
||||||
|
@ -95,8 +113,10 @@ jobs:
|
||||||
|
|
||||||
- name: Create release
|
- name: Create release
|
||||||
uses: ncipollo/release-action@95215a3cb6e6a1908b3c44e00b4fdb15548b1e09 # v2.8.5
|
uses: ncipollo/release-action@95215a3cb6e6a1908b3c44e00b4fdb15548b1e09 # v2.8.5
|
||||||
|
if: ${{ steps.release-channel.outputs.channel }} == "latest"
|
||||||
env:
|
env:
|
||||||
PKG_VERSION: ${{ steps.version.outputs.version }}
|
PKG_VERSION: ${{ steps.version.outputs.version }}
|
||||||
|
RELEASE_CHANNEL: ${{ steps.release-channel.outputs.channel }}
|
||||||
with:
|
with:
|
||||||
artifacts: "apps/desktop/artifacts/Bitwarden-${{ env.PKG_VERSION }}-amd64.deb,
|
artifacts: "apps/desktop/artifacts/Bitwarden-${{ env.PKG_VERSION }}-amd64.deb,
|
||||||
apps/desktop/artifacts/Bitwarden-${{ env.PKG_VERSION }}-x86_64.rpm,
|
apps/desktop/artifacts/Bitwarden-${{ env.PKG_VERSION }}-x86_64.rpm,
|
||||||
|
@ -118,7 +138,10 @@ jobs:
|
||||||
apps/desktop/artifacts/Bitwarden-${{ env.PKG_VERSION }}-universal-mac.zip,
|
apps/desktop/artifacts/Bitwarden-${{ env.PKG_VERSION }}-universal-mac.zip,
|
||||||
apps/desktop/artifacts/Bitwarden-${{ env.PKG_VERSION }}-universal.dmg,
|
apps/desktop/artifacts/Bitwarden-${{ env.PKG_VERSION }}-universal.dmg,
|
||||||
apps/desktop/artifacts/Bitwarden-${{ env.PKG_VERSION }}-universal.dmg.blockmap,
|
apps/desktop/artifacts/Bitwarden-${{ env.PKG_VERSION }}-universal.dmg.blockmap,
|
||||||
apps/desktop/artifacts/Bitwarden-${{ env.PKG_VERSION }}-universal.pkg.archive"
|
apps/desktop/artifacts/Bitwarden-${{ env.PKG_VERSION }}-universal.pkg.archive,
|
||||||
|
apps/desktop/artifacts/${{ env.RELEASE_CHANNEL }}.yml,
|
||||||
|
apps/desktop/artifacts/${{ env.RELEASE_CHANNEL }}-linux.yml,
|
||||||
|
apps/desktop/artifacts/${{ env.RELEASE_CHANNEL }}-mac.yml"
|
||||||
commit: ${{ github.sha }}
|
commit: ${{ github.sha }}
|
||||||
tag: desktop-v${{ env.PKG_VERSION }}
|
tag: desktop-v${{ env.PKG_VERSION }}
|
||||||
name: Desktop v${{ env.PKG_VERSION }}
|
name: Desktop v${{ env.PKG_VERSION }}
|
||||||
|
@ -126,6 +149,7 @@ jobs:
|
||||||
token: ${{ secrets.GITHUB_TOKEN }}
|
token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
draft: true
|
draft: true
|
||||||
|
|
||||||
|
|
||||||
snap:
|
snap:
|
||||||
name: Deploy Snap
|
name: Deploy Snap
|
||||||
runs-on: ubuntu-20.04
|
runs-on: ubuntu-20.04
|
||||||
|
|
|
@ -9,6 +9,7 @@
|
||||||
"asarUnpack": ["**/*.node"],
|
"asarUnpack": ["**/*.node"],
|
||||||
"files": ["**/*", "!**/node_modules/@bitwarden/desktop-native/**/*"],
|
"files": ["**/*", "!**/node_modules/@bitwarden/desktop-native/**/*"],
|
||||||
"electronVersion": "16.2.7",
|
"electronVersion": "16.2.7",
|
||||||
|
"generateUpdatesFilesForAllChannels": true,
|
||||||
"publish": {
|
"publish": {
|
||||||
"provider": "generic",
|
"provider": "generic",
|
||||||
"url": "https://artifacts.bitwarden.com/desktop"
|
"url": "https://artifacts.bitwarden.com/desktop"
|
||||||
|
|
Loading…
Reference in New Issue