diff --git a/.github/workflows/release-browser.yml b/.github/workflows/release-browser.yml index da8780599c..3568f6e29e 100644 --- a/.github/workflows/release-browser.yml +++ b/.github/workflows/release-browser.yml @@ -90,6 +90,22 @@ jobs: - setup - locales-test steps: + - name: Create GitHub deployment + uses: chrnorm/deployment-action@1b599fe41a0ef1f95191e7f2eec4743f2d7dfc48 + id: deployment + with: + token: '${{ secrets.GITHUB_TOKEN }}' + environment: 'Browser - Production' + description: 'Deployment ${{ needs.setup.outputs.release-version }} from branch ${{ github.ref_name }}' + 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 if: ${{ github.event.inputs.release_type != 'Dry Run' }} uses: bitwarden/gh-actions/download-artifacts@c1fa8e09871a860862d6bbe36184b06d2c7e35a8 @@ -141,3 +157,19 @@ jobs: body: "" token: ${{ secrets.GITHUB_TOKEN }} draft: true + + - 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 }} diff --git a/.github/workflows/release-cli.yml b/.github/workflows/release-cli.yml index 31b5f058c8..861c1d9e3f 100644 --- a/.github/workflows/release-cli.yml +++ b/.github/workflows/release-cli.yml @@ -64,6 +64,22 @@ jobs: monorepo: true monorepo-project: cli + - name: Create GitHub deployment for Snap + uses: chrnorm/deployment-action@1b599fe41a0ef1f95191e7f2eec4743f2d7dfc48 + id: deployment + with: + token: '${{ secrets.GITHUB_TOKEN }}' + environment: 'CLI - Production' + description: 'Deployment ${{ steps.version.outputs.version }} from branch ${{ github.ref_name }}' + 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 if: ${{ github.event.inputs.release_type != 'Dry Run' }} uses: bitwarden/gh-actions/download-artifacts@c1fa8e09871a860862d6bbe36184b06d2c7e35a8 @@ -104,6 +120,21 @@ jobs: token: ${{ secrets.GITHUB_TOKEN }} draft: true + - 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 }} snap: name: Deploy Snap @@ -159,7 +190,6 @@ jobs: snapcraft push bw_${{ env._PKG_VERSION }}_amd64.snap --release stable snapcraft logout - choco: name: Deploy Choco runs-on: windows-2019 @@ -219,7 +249,6 @@ jobs: cd dist choco push - npm: name: Publish NPM runs-on: ubuntu-20.04 @@ -274,3 +303,4 @@ jobs: - name: Publish NPM if: ${{ github.event.inputs.release_type != 'Dry Run' }} run: npm publish --access public + diff --git a/.github/workflows/release-desktop.yml b/.github/workflows/release-desktop.yml index f6fd411a24..9b8af6afd2 100644 --- a/.github/workflows/release-desktop.yml +++ b/.github/workflows/release-desktop.yml @@ -76,6 +76,22 @@ jobs: ;; esac + - name: Create GitHub deployment + uses: chrnorm/deployment-action@1b599fe41a0ef1f95191e7f2eec4743f2d7dfc48 + id: deployment + with: + token: '${{ secrets.GITHUB_TOKEN }}' + environment: 'Desktop - Production' + description: 'Deployment ${{ steps.version.outputs.version }} to channel ${{ steps.release-channel.outputs.channel }} from branch ${{ github.ref_name }}' + 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 uses: Azure/login@ec3c14589bd3e9312b3cc8c41e6860e258df9010 with: @@ -164,6 +180,21 @@ jobs: token: ${{ secrets.GITHUB_TOKEN }} draft: true + - 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 }} snap: name: Deploy Snap diff --git a/.github/workflows/release-qa-web.yml b/.github/workflows/release-qa-web.yml index d72783ec48..d9a3fa3c1b 100644 --- a/.github/workflows/release-qa-web.yml +++ b/.github/workflows/release-qa-web.yml @@ -72,6 +72,23 @@ jobs: name: Deploy Web Vault to QA CloudFlare Pages branch runs-on: ubuntu-20.04 steps: + - name: Create GitHub deployment + uses: chrnorm/deployment-action@1b599fe41a0ef1f95191e7f2eec4743f2d7dfc48 + id: deployment + with: + token: '${{ secrets.GITHUB_TOKEN }}' + environment-url: http://vault.qa.bitwarden.pw + environment: 'Web Vault - QA' + description: 'Deployment from branch ${{ github.ref_name }}' + + - name: Update deployment status to In Progress + uses: chrnorm/deployment-status@07b3930847f65e71c9c6802ff5a402f6dfb46b86 + with: + token: '${{ secrets.GITHUB_TOKEN }}' + environment-url: http://vault.qa.bitwarden.pw + state: 'in_progress' + deployment-id: ${{ steps.deployment.outputs.deployment_id }} + - name: Checkout Repo uses: actions/checkout@2541b1294d2704b0964813337f33b291d3f8596b # v3.0.2 @@ -118,3 +135,21 @@ jobs: echo "No changes to commit!"; fi working-directory: deployment + + - name: Update deployment status to Success + if: success() + uses: chrnorm/deployment-status@07b3930847f65e71c9c6802ff5a402f6dfb46b86 + with: + token: '${{ secrets.GITHUB_TOKEN }}' + environment-url: http://vault.qa.bitwarden.pw + 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 }}' + environment-url: http://vault.qa.bitwarden.pw + state: 'failure' + deployment-id: ${{ steps.deployment.outputs.deployment_id }} diff --git a/.github/workflows/release-web.yml b/.github/workflows/release-web.yml index 1db2b6dbe2..d06d2268e0 100644 --- a/.github/workflows/release-web.yml +++ b/.github/workflows/release-web.yml @@ -227,6 +227,24 @@ jobs: - self-host - cfpages-deploy steps: + - name: Create GitHub deployment + uses: chrnorm/deployment-action@1b599fe41a0ef1f95191e7f2eec4743f2d7dfc48 + id: deployment + with: + token: '${{ secrets.GITHUB_TOKEN }}' + environment-url: http://vault.bitwarden.com + environment: 'Web Vault - Production' + description: 'Deployment ${{ needs.setup.outputs.release_version }} from branch ${{ github.ref_name }}' + 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 if: ${{ github.event.inputs.release_type != 'Dry Run' }} uses: bitwarden/gh-actions/download-artifacts@c1fa8e09871a860862d6bbe36184b06d2c7e35a8 @@ -267,3 +285,21 @@ jobs: apps/web/artifacts/web-${{ needs.setup.outputs.release_version }}-selfhosted-open-source.zip" token: ${{ secrets.GITHUB_TOKEN }} draft: true + + - name: Update deployment status to Success + if: success() + uses: chrnorm/deployment-status@07b3930847f65e71c9c6802ff5a402f6dfb46b86 + with: + token: '${{ secrets.GITHUB_TOKEN }}' + environment-url: http://vault.bitwarden.com + 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 }}' + environment-url: http://vault.bitwarden.com + state: 'failure' + deployment-id: ${{ steps.deployment.outputs.deployment_id }}