ENG-71 - Updated release workflows with cleanup recommended by Vince (#3224)
* Updated release jobs to include fixes that Vince recommended from the mobile repo * Updated the workflows with the fixes that Vince recommended from mobile. * Fix linter errors Co-authored-by: Todd Martin <> Co-authored-by: Michal Checinski <michal.checinski@outlook.com>
This commit is contained in:
parent
1a49117d8a
commit
56ce85c69c
|
@ -95,16 +95,10 @@ jobs:
|
||||||
id: deployment
|
id: deployment
|
||||||
with:
|
with:
|
||||||
token: '${{ secrets.GITHUB_TOKEN }}'
|
token: '${{ secrets.GITHUB_TOKEN }}'
|
||||||
|
initial-status: 'in_progress'
|
||||||
environment: 'Browser - Production'
|
environment: 'Browser - Production'
|
||||||
description: 'Deployment ${{ needs.setup.outputs.release-version }} from branch ${{ github.ref_name }}'
|
description: 'Deployment ${{ needs.setup.outputs.release-version }} from branch ${{ github.ref_name }}'
|
||||||
task: release
|
task: release
|
||||||
|
|
||||||
- name: Update deployment status to In Progress
|
|
||||||
uses: chrnorm/deployment-status@07b3930847f65e71c9c6802ff5a402f6dfb46b86
|
|
||||||
with:
|
|
||||||
token: '${{ secrets.GITHUB_TOKEN }}'
|
|
||||||
state: 'in_progress'
|
|
||||||
deployment-id: ${{ steps.deployment.outputs.deployment_id }}
|
|
||||||
|
|
||||||
- name: Download latest Release build artifacts
|
- name: Download latest Release build artifacts
|
||||||
if: ${{ github.event.inputs.release_type != 'Dry Run' }}
|
if: ${{ github.event.inputs.release_type != 'Dry Run' }}
|
||||||
|
@ -159,7 +153,7 @@ jobs:
|
||||||
draft: true
|
draft: true
|
||||||
|
|
||||||
- name: Update deployment status to Success
|
- name: Update deployment status to Success
|
||||||
if: success()
|
if: ${{ success() }}
|
||||||
uses: chrnorm/deployment-status@07b3930847f65e71c9c6802ff5a402f6dfb46b86
|
uses: chrnorm/deployment-status@07b3930847f65e71c9c6802ff5a402f6dfb46b86
|
||||||
with:
|
with:
|
||||||
token: '${{ secrets.GITHUB_TOKEN }}'
|
token: '${{ secrets.GITHUB_TOKEN }}'
|
||||||
|
@ -167,7 +161,7 @@ jobs:
|
||||||
deployment-id: ${{ steps.deployment.outputs.deployment_id }}
|
deployment-id: ${{ steps.deployment.outputs.deployment_id }}
|
||||||
|
|
||||||
- name: Update deployment status to Failure
|
- name: Update deployment status to Failure
|
||||||
if: failure()
|
if: ${{ failure() }}
|
||||||
uses: chrnorm/deployment-status@07b3930847f65e71c9c6802ff5a402f6dfb46b86
|
uses: chrnorm/deployment-status@07b3930847f65e71c9c6802ff5a402f6dfb46b86
|
||||||
with:
|
with:
|
||||||
token: '${{ secrets.GITHUB_TOKEN }}'
|
token: '${{ secrets.GITHUB_TOKEN }}'
|
||||||
|
|
|
@ -69,16 +69,10 @@ jobs:
|
||||||
id: deployment
|
id: deployment
|
||||||
with:
|
with:
|
||||||
token: '${{ secrets.GITHUB_TOKEN }}'
|
token: '${{ secrets.GITHUB_TOKEN }}'
|
||||||
|
initial-status: 'in_progress'
|
||||||
environment: 'CLI - Production'
|
environment: 'CLI - Production'
|
||||||
description: 'Deployment ${{ steps.version.outputs.version }} from branch ${{ github.ref_name }}'
|
description: 'Deployment ${{ steps.version.outputs.version }} from branch ${{ github.ref_name }}'
|
||||||
task: release
|
task: release
|
||||||
|
|
||||||
- name: Update deployment status to In Progress
|
|
||||||
uses: chrnorm/deployment-status@07b3930847f65e71c9c6802ff5a402f6dfb46b86
|
|
||||||
with:
|
|
||||||
token: '${{ secrets.GITHUB_TOKEN }}'
|
|
||||||
state: 'in_progress'
|
|
||||||
deployment-id: ${{ steps.deployment.outputs.deployment_id }}
|
|
||||||
|
|
||||||
- name: Download all Release artifacts
|
- name: Download all Release artifacts
|
||||||
if: ${{ github.event.inputs.release_type != 'Dry Run' }}
|
if: ${{ github.event.inputs.release_type != 'Dry Run' }}
|
||||||
|
@ -121,7 +115,7 @@ jobs:
|
||||||
draft: true
|
draft: true
|
||||||
|
|
||||||
- name: Update deployment status to Success
|
- name: Update deployment status to Success
|
||||||
if: success()
|
if: ${{ success() }}
|
||||||
uses: chrnorm/deployment-status@07b3930847f65e71c9c6802ff5a402f6dfb46b86
|
uses: chrnorm/deployment-status@07b3930847f65e71c9c6802ff5a402f6dfb46b86
|
||||||
with:
|
with:
|
||||||
token: '${{ secrets.GITHUB_TOKEN }}'
|
token: '${{ secrets.GITHUB_TOKEN }}'
|
||||||
|
@ -129,7 +123,7 @@ jobs:
|
||||||
deployment-id: ${{ steps.deployment.outputs.deployment_id }}
|
deployment-id: ${{ steps.deployment.outputs.deployment_id }}
|
||||||
|
|
||||||
- name: Update deployment status to Failure
|
- name: Update deployment status to Failure
|
||||||
if: failure()
|
if: ${{ failure() }}
|
||||||
uses: chrnorm/deployment-status@07b3930847f65e71c9c6802ff5a402f6dfb46b86
|
uses: chrnorm/deployment-status@07b3930847f65e71c9c6802ff5a402f6dfb46b86
|
||||||
with:
|
with:
|
||||||
token: '${{ secrets.GITHUB_TOKEN }}'
|
token: '${{ secrets.GITHUB_TOKEN }}'
|
||||||
|
|
|
@ -20,6 +20,7 @@ jobs:
|
||||||
release-version: ${{ steps.version.outputs.version }}
|
release-version: ${{ steps.version.outputs.version }}
|
||||||
release-channel: ${{ steps.release-channel.outputs.channel }}
|
release-channel: ${{ steps.release-channel.outputs.channel }}
|
||||||
branch-name: ${{ steps.branch.outputs.branch-name }}
|
branch-name: ${{ steps.branch.outputs.branch-name }}
|
||||||
|
build_number: ${{ steps.increment-version.outputs.build_number }}
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout repo
|
- name: Checkout repo
|
||||||
uses: actions/checkout@2541b1294d2704b0964813337f33b291d3f8596b # v3.0.2
|
uses: actions/checkout@2541b1294d2704b0964813337f33b291d3f8596b # v3.0.2
|
||||||
|
@ -48,12 +49,19 @@ jobs:
|
||||||
id: version
|
id: version
|
||||||
uses: bitwarden/gh-actions/release-version-check@ea9fab01d76940267b4147cc1c4542431246b9f6
|
uses: bitwarden/gh-actions/release-version-check@ea9fab01d76940267b4147cc1c4542431246b9f6
|
||||||
with:
|
with:
|
||||||
release-type: ${{ github.event.inputs.release_type }}
|
release-type: 'Initial Release'
|
||||||
project-type: ts
|
project-type: ts
|
||||||
file: apps/desktop/src/package.json
|
file: apps/desktop/src/package.json
|
||||||
monorepo: true
|
monorepo: true
|
||||||
monorepo-project: desktop
|
monorepo-project: desktop
|
||||||
|
|
||||||
|
- name: Increment Version
|
||||||
|
id: increment-version
|
||||||
|
run: |
|
||||||
|
BUILD_NUMBER=$(expr 3000 + $GITHUB_RUN_NUMBER)
|
||||||
|
echo "Setting build number to $BUILD_NUMBER"
|
||||||
|
echo "::set-output name=build_number::$BUILD_NUMBER"
|
||||||
|
|
||||||
- name: Get Version Channel
|
- name: Get Version Channel
|
||||||
id: release-channel
|
id: release-channel
|
||||||
run: |
|
run: |
|
||||||
|
@ -907,6 +915,16 @@ jobs:
|
||||||
- macos-package-github
|
- macos-package-github
|
||||||
- macos-package-mas
|
- macos-package-mas
|
||||||
steps:
|
steps:
|
||||||
|
- name: Create GitHub deployment
|
||||||
|
uses: chrnorm/deployment-action@1b599fe41a0ef1f95191e7f2eec4743f2d7dfc48
|
||||||
|
id: deployment
|
||||||
|
with:
|
||||||
|
token: '${{ secrets.GITHUB_TOKEN }}'
|
||||||
|
initial-status: 'in_progress'
|
||||||
|
environment: 'Desktop - Beta'
|
||||||
|
description: 'Deployment ${{ needs.setup.outputs.release-version }} to channel ${{ needs.setup.outputs.release-channel }} from branch ${{ needs.setup.outputs.branch-name }}'
|
||||||
|
task: release
|
||||||
|
|
||||||
- name: Login to Azure
|
- name: Login to Azure
|
||||||
uses: Azure/login@ec3c14589bd3e9312b3cc8c41e6860e258df9010
|
uses: Azure/login@ec3c14589bd3e9312b3cc8c41e6860e258df9010
|
||||||
with:
|
with:
|
||||||
|
@ -926,7 +944,7 @@ jobs:
|
||||||
|
|
||||||
- name: Rename .pkg to .pkg.archive
|
- name: Rename .pkg to .pkg.archive
|
||||||
env:
|
env:
|
||||||
PKG_VERSION: ${{ steps.version.outputs.version }}
|
PKG_VERSION: ${{ needs.setup.outputs.release-version }}
|
||||||
working-directory: apps/desktop/artifacts
|
working-directory: apps/desktop/artifacts
|
||||||
run: mv Bitwarden-${{ env.PKG_VERSION }}-universal.pkg Bitwarden-${{ env.PKG_VERSION }}-universal.pkg.archive
|
run: mv Bitwarden-${{ env.PKG_VERSION }}-universal.pkg Bitwarden-${{ env.PKG_VERSION }}-universal.pkg.archive
|
||||||
|
|
||||||
|
@ -943,6 +961,21 @@ jobs:
|
||||||
--recursive \
|
--recursive \
|
||||||
--quiet
|
--quiet
|
||||||
|
|
||||||
|
- name: Update deployment status to Success
|
||||||
|
if: ${{ success() }}
|
||||||
|
uses: chrnorm/deployment-status@07b3930847f65e71c9c6802ff5a402f6dfb46b86
|
||||||
|
with:
|
||||||
|
token: '${{ secrets.GITHUB_TOKEN }}'
|
||||||
|
state: 'success'
|
||||||
|
deployment-id: ${{ steps.deployment.outputs.deployment_id }}
|
||||||
|
|
||||||
|
- name: Update deployment status to Failure
|
||||||
|
if: ${{ failure() }}
|
||||||
|
uses: chrnorm/deployment-status@07b3930847f65e71c9c6802ff5a402f6dfb46b86
|
||||||
|
with:
|
||||||
|
token: '${{ secrets.GITHUB_TOKEN }}'
|
||||||
|
state: 'failure'
|
||||||
|
deployment-id: ${{ steps.deployment.outputs.deployment_id }}
|
||||||
|
|
||||||
remove-branch:
|
remove-branch:
|
||||||
name: Remove branch
|
name: Remove branch
|
||||||
|
|
|
@ -81,16 +81,10 @@ jobs:
|
||||||
id: deployment
|
id: deployment
|
||||||
with:
|
with:
|
||||||
token: '${{ secrets.GITHUB_TOKEN }}'
|
token: '${{ secrets.GITHUB_TOKEN }}'
|
||||||
|
initial-status: 'in_progress'
|
||||||
environment: 'Desktop - Production'
|
environment: 'Desktop - Production'
|
||||||
description: 'Deployment ${{ steps.version.outputs.version }} to channel ${{ steps.release-channel.outputs.channel }} from branch ${{ github.ref_name }}'
|
description: 'Deployment ${{ steps.version.outputs.version }} to channel ${{ steps.release-channel.outputs.channel }} from branch ${{ github.ref_name }}'
|
||||||
task: release
|
task: release
|
||||||
|
|
||||||
- name: Update deployment status to In Progress
|
|
||||||
uses: chrnorm/deployment-status@1b599fe41a0ef1f95191e7f2eec4743f2d7dfc48
|
|
||||||
with:
|
|
||||||
token: '${{ secrets.GITHUB_TOKEN }}'
|
|
||||||
state: 'failure'
|
|
||||||
deployment-id: ${{ steps.deployment.outputs.deployment_id }}
|
|
||||||
|
|
||||||
- name: Login to Azure
|
- name: Login to Azure
|
||||||
uses: Azure/login@ec3c14589bd3e9312b3cc8c41e6860e258df9010
|
uses: Azure/login@ec3c14589bd3e9312b3cc8c41e6860e258df9010
|
||||||
|
@ -181,7 +175,7 @@ jobs:
|
||||||
draft: true
|
draft: true
|
||||||
|
|
||||||
- name: Update deployment status to Success
|
- name: Update deployment status to Success
|
||||||
if: success()
|
if: ${{ success() }}
|
||||||
uses: chrnorm/deployment-status@07b3930847f65e71c9c6802ff5a402f6dfb46b86
|
uses: chrnorm/deployment-status@07b3930847f65e71c9c6802ff5a402f6dfb46b86
|
||||||
with:
|
with:
|
||||||
token: '${{ secrets.GITHUB_TOKEN }}'
|
token: '${{ secrets.GITHUB_TOKEN }}'
|
||||||
|
@ -189,7 +183,7 @@ jobs:
|
||||||
deployment-id: ${{ steps.deployment.outputs.deployment_id }}
|
deployment-id: ${{ steps.deployment.outputs.deployment_id }}
|
||||||
|
|
||||||
- name: Update deployment status to Failure
|
- name: Update deployment status to Failure
|
||||||
if: failure()
|
if: ${{ failure() }}
|
||||||
uses: chrnorm/deployment-status@07b3930847f65e71c9c6802ff5a402f6dfb46b86
|
uses: chrnorm/deployment-status@07b3930847f65e71c9c6802ff5a402f6dfb46b86
|
||||||
with:
|
with:
|
||||||
token: '${{ secrets.GITHUB_TOKEN }}'
|
token: '${{ secrets.GITHUB_TOKEN }}'
|
||||||
|
|
|
@ -77,6 +77,7 @@ jobs:
|
||||||
id: deployment
|
id: deployment
|
||||||
with:
|
with:
|
||||||
token: '${{ secrets.GITHUB_TOKEN }}'
|
token: '${{ secrets.GITHUB_TOKEN }}'
|
||||||
|
initial-status: 'in_progress'
|
||||||
environment-url: http://vault.qa.bitwarden.pw
|
environment-url: http://vault.qa.bitwarden.pw
|
||||||
environment: 'Web Vault - QA'
|
environment: 'Web Vault - QA'
|
||||||
description: 'Deployment from branch ${{ github.ref_name }}'
|
description: 'Deployment from branch ${{ github.ref_name }}'
|
||||||
|
@ -137,7 +138,7 @@ jobs:
|
||||||
working-directory: deployment
|
working-directory: deployment
|
||||||
|
|
||||||
- name: Update deployment status to Success
|
- name: Update deployment status to Success
|
||||||
if: success()
|
if: ${{ success() }}
|
||||||
uses: chrnorm/deployment-status@07b3930847f65e71c9c6802ff5a402f6dfb46b86
|
uses: chrnorm/deployment-status@07b3930847f65e71c9c6802ff5a402f6dfb46b86
|
||||||
with:
|
with:
|
||||||
token: '${{ secrets.GITHUB_TOKEN }}'
|
token: '${{ secrets.GITHUB_TOKEN }}'
|
||||||
|
@ -146,7 +147,7 @@ jobs:
|
||||||
deployment-id: ${{ steps.deployment.outputs.deployment_id }}
|
deployment-id: ${{ steps.deployment.outputs.deployment_id }}
|
||||||
|
|
||||||
- name: Update deployment status to Failure
|
- name: Update deployment status to Failure
|
||||||
if: failure()
|
if: ${{ failure() }}
|
||||||
uses: chrnorm/deployment-status@07b3930847f65e71c9c6802ff5a402f6dfb46b86
|
uses: chrnorm/deployment-status@07b3930847f65e71c9c6802ff5a402f6dfb46b86
|
||||||
with:
|
with:
|
||||||
token: '${{ secrets.GITHUB_TOKEN }}'
|
token: '${{ secrets.GITHUB_TOKEN }}'
|
||||||
|
|
|
@ -232,18 +232,11 @@ jobs:
|
||||||
id: deployment
|
id: deployment
|
||||||
with:
|
with:
|
||||||
token: '${{ secrets.GITHUB_TOKEN }}'
|
token: '${{ secrets.GITHUB_TOKEN }}'
|
||||||
|
initial-status: 'in_progress'
|
||||||
environment-url: http://vault.bitwarden.com
|
environment-url: http://vault.bitwarden.com
|
||||||
environment: 'Web Vault - Production'
|
environment: 'Web Vault - Production'
|
||||||
description: 'Deployment ${{ needs.setup.outputs.release_version }} from branch ${{ github.ref_name }}'
|
description: 'Deployment ${{ needs.setup.outputs.release_version }} from branch ${{ github.ref_name }}'
|
||||||
task: release
|
task: release
|
||||||
|
|
||||||
- name: Update deployment status to In Progress
|
|
||||||
uses: chrnorm/deployment-status@07b3930847f65e71c9c6802ff5a402f6dfb46b86
|
|
||||||
with:
|
|
||||||
token: '${{ secrets.GITHUB_TOKEN }}'
|
|
||||||
environment-url: http://vault.bitwarden.com
|
|
||||||
state: 'in_progress'
|
|
||||||
deployment-id: ${{ steps.deployment.outputs.deployment_id }}
|
|
||||||
|
|
||||||
- name: Download latest build artifacts
|
- name: Download latest build artifacts
|
||||||
if: ${{ github.event.inputs.release_type != 'Dry Run' }}
|
if: ${{ github.event.inputs.release_type != 'Dry Run' }}
|
||||||
|
@ -287,7 +280,7 @@ jobs:
|
||||||
draft: true
|
draft: true
|
||||||
|
|
||||||
- name: Update deployment status to Success
|
- name: Update deployment status to Success
|
||||||
if: success()
|
if: ${{ success() }}
|
||||||
uses: chrnorm/deployment-status@07b3930847f65e71c9c6802ff5a402f6dfb46b86
|
uses: chrnorm/deployment-status@07b3930847f65e71c9c6802ff5a402f6dfb46b86
|
||||||
with:
|
with:
|
||||||
token: '${{ secrets.GITHUB_TOKEN }}'
|
token: '${{ secrets.GITHUB_TOKEN }}'
|
||||||
|
@ -296,7 +289,7 @@ jobs:
|
||||||
deployment-id: ${{ steps.deployment.outputs.deployment_id }}
|
deployment-id: ${{ steps.deployment.outputs.deployment_id }}
|
||||||
|
|
||||||
- name: Update deployment status to Failure
|
- name: Update deployment status to Failure
|
||||||
if: failure()
|
if: ${{ failure() }}
|
||||||
uses: chrnorm/deployment-status@07b3930847f65e71c9c6802ff5a402f6dfb46b86
|
uses: chrnorm/deployment-status@07b3930847f65e71c9c6802ff5a402f6dfb46b86
|
||||||
with:
|
with:
|
||||||
token: '${{ secrets.GITHUB_TOKEN }}'
|
token: '${{ secrets.GITHUB_TOKEN }}'
|
||||||
|
|
Loading…
Reference in New Issue