Update workflows (#2945)
This commit is contained in:
parent
9dd49a0023
commit
8fb1fc41b2
|
@ -1,7 +1,10 @@
|
||||||
---
|
---
|
||||||
name: Chromatic
|
name: Chromatic
|
||||||
|
|
||||||
on: push
|
on:
|
||||||
|
push:
|
||||||
|
paths-ignore:
|
||||||
|
- '.github/workflows/**'
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
chromatic:
|
chromatic:
|
||||||
|
|
|
@ -24,7 +24,6 @@ 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 }}
|
||||||
branch-name: ${{ steps.branch.outputs.branch-name }}
|
|
||||||
steps:
|
steps:
|
||||||
- name: Branch check
|
- name: Branch check
|
||||||
if: ${{ github.event.inputs.release_type != 'Dry Run' }}
|
if: ${{ github.event.inputs.release_type != 'Dry Run' }}
|
||||||
|
@ -49,12 +48,6 @@ jobs:
|
||||||
monorepo: true
|
monorepo: true
|
||||||
monorepo-project: browser
|
monorepo-project: browser
|
||||||
|
|
||||||
- name: Get branch name
|
|
||||||
id: branch
|
|
||||||
run: |
|
|
||||||
BRANCH_NAME=$(basename ${{ github.ref }})
|
|
||||||
echo "::set-output name=branch-name::$BRANCH_NAME"
|
|
||||||
|
|
||||||
|
|
||||||
locales-test:
|
locales-test:
|
||||||
name: Locales Test
|
name: Locales Test
|
||||||
|
@ -102,7 +95,7 @@ jobs:
|
||||||
with:
|
with:
|
||||||
workflow: build-browser.yml
|
workflow: build-browser.yml
|
||||||
workflow_conclusion: success
|
workflow_conclusion: success
|
||||||
branch: ${{ needs.setup.outputs.branch-name }}
|
branch: ${{ github.ref_name }}
|
||||||
artifacts: 'browser-source-*.zip,
|
artifacts: 'browser-source-*.zip,
|
||||||
dist-chrome-*.zip,
|
dist-chrome-*.zip,
|
||||||
dist-opera-*.zip,
|
dist-opera-*.zip,
|
||||||
|
|
|
@ -24,7 +24,6 @@ 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 }}
|
||||||
branch-name: ${{ steps.branch.outputs.branch-name }}
|
|
||||||
steps:
|
steps:
|
||||||
- name: Branch check
|
- name: Branch check
|
||||||
if: ${{ github.event.inputs.release_type != 'Dry Run' }}
|
if: ${{ github.event.inputs.release_type != 'Dry Run' }}
|
||||||
|
@ -49,21 +48,16 @@ jobs:
|
||||||
monorepo: true
|
monorepo: true
|
||||||
monorepo-project: cli
|
monorepo-project: cli
|
||||||
|
|
||||||
- name: Get branch name
|
|
||||||
id: branch
|
|
||||||
run: |
|
|
||||||
BRANCH_NAME=$(basename ${{ github.ref }})
|
|
||||||
echo "::set-output name=branch-name::$BRANCH_NAME"
|
|
||||||
|
|
||||||
- name: Download all artifacts
|
- name: Download all artifacts
|
||||||
uses: bitwarden/gh-actions/download-artifacts@c1fa8e09871a860862d6bbe36184b06d2c7e35a8
|
uses: bitwarden/gh-actions/download-artifacts@c1fa8e09871a860862d6bbe36184b06d2c7e35a8
|
||||||
with:
|
with:
|
||||||
workflow: build-cli.yml
|
workflow: build-cli.yml
|
||||||
path: apps/cli
|
path: apps/cli
|
||||||
workflow_conclusion: success
|
workflow_conclusion: success
|
||||||
branch: ${{ steps.branch.outputs.branch-name }}
|
branch: ${{ github.ref_name }}
|
||||||
|
|
||||||
- name: Create release
|
- name: Create release
|
||||||
|
if: ${{ github.event.inputs.release_type != 'Dry Run' }}
|
||||||
uses: ncipollo/release-action@58ae73b360456532aafd58ee170c045abbeaee37 # v1.10.0
|
uses: ncipollo/release-action@58ae73b360456532aafd58ee170c045abbeaee37 # v1.10.0
|
||||||
env:
|
env:
|
||||||
PKG_VERSION: ${{ steps.version.outputs.version }}
|
PKG_VERSION: ${{ steps.version.outputs.version }}
|
||||||
|
@ -118,7 +112,7 @@ jobs:
|
||||||
workflow: build-cli.yml
|
workflow: build-cli.yml
|
||||||
path: apps/cli
|
path: apps/cli
|
||||||
workflow_conclusion: success
|
workflow_conclusion: success
|
||||||
branch: ${{ needs.setup.outputs.branch-name }}
|
branch: ${{ github.ref_name }}
|
||||||
artifacts: bw_${{ env._PKG_VERSION }}_amd64.snap
|
artifacts: bw_${{ env._PKG_VERSION }}_amd64.snap
|
||||||
|
|
||||||
- name: Publish Snap & logout
|
- name: Publish Snap & logout
|
||||||
|
@ -153,7 +147,7 @@ jobs:
|
||||||
workflow: build-cli.yml
|
workflow: build-cli.yml
|
||||||
path: apps/cli
|
path: apps/cli
|
||||||
workflow_conclusion: success
|
workflow_conclusion: success
|
||||||
branch: ${{ needs.setup.outputs.branch-name }}
|
branch: ${{ github.ref_name }}
|
||||||
artifacts: bitwarden-cli.${{ env._PKG_VERSION }}.nupkg
|
artifacts: bitwarden-cli.${{ env._PKG_VERSION }}.nupkg
|
||||||
|
|
||||||
- name: Push to Chocolatey
|
- name: Push to Chocolatey
|
||||||
|
@ -180,7 +174,7 @@ jobs:
|
||||||
workflow: build-cli.yml
|
workflow: build-cli.yml
|
||||||
path: apps/cli
|
path: apps/cli
|
||||||
workflow_conclusion: success
|
workflow_conclusion: success
|
||||||
branch: ${{ needs.setup.outputs.branch-name }}
|
branch: ${{ github.ref_name }}
|
||||||
artifacts: bitwarden-cli-${{ env._PKG_VERSION }}-npm-build.zip
|
artifacts: bitwarden-cli-${{ env._PKG_VERSION }}-npm-build.zip
|
||||||
|
|
||||||
- name: Setup NPM
|
- name: Setup NPM
|
||||||
|
|
|
@ -24,7 +24,6 @@ jobs:
|
||||||
outputs:
|
outputs:
|
||||||
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 }}
|
|
||||||
steps:
|
steps:
|
||||||
- name: Branch check
|
- name: Branch check
|
||||||
if: ${{ github.event.inputs.release_type != 'Dry Run' }}
|
if: ${{ github.event.inputs.release_type != 'Dry Run' }}
|
||||||
|
@ -66,12 +65,6 @@ jobs:
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
- name: Get branch name
|
|
||||||
id: branch
|
|
||||||
run: |
|
|
||||||
BRANCH_NAME=$(basename ${{ github.ref }})
|
|
||||||
echo "::set-output name=branch-name::$BRANCH_NAME"
|
|
||||||
|
|
||||||
- name: Login to Azure
|
- name: Login to Azure
|
||||||
uses: Azure/login@ec3c14589bd3e9312b3cc8c41e6860e258df9010
|
uses: Azure/login@ec3c14589bd3e9312b3cc8c41e6860e258df9010
|
||||||
with:
|
with:
|
||||||
|
@ -89,7 +82,7 @@ jobs:
|
||||||
with:
|
with:
|
||||||
workflow: build-desktop.yml
|
workflow: build-desktop.yml
|
||||||
workflow_conclusion: success
|
workflow_conclusion: success
|
||||||
branch: ${{ steps.branch.outputs.branch-name }}
|
branch: ${{ github.ref_name }}
|
||||||
path: apps/desktop/artifacts
|
path: apps/desktop/artifacts
|
||||||
|
|
||||||
- name: Rename .pkg to .pkg.archive
|
- name: Rename .pkg to .pkg.archive
|
||||||
|
@ -186,7 +179,7 @@ jobs:
|
||||||
with:
|
with:
|
||||||
workflow: build-desktop.yml
|
workflow: build-desktop.yml
|
||||||
workflow_conclusion: success
|
workflow_conclusion: success
|
||||||
branch: ${{ needs.setup.outputs.branch-name }}
|
branch: ${{ github.ref_name }}
|
||||||
artifacts: bitwarden_${{ env._PKG_VERSION }}_amd64.snap
|
artifacts: bitwarden_${{ env._PKG_VERSION }}_amd64.snap
|
||||||
path: apps/desktop/dist
|
path: apps/desktop/dist
|
||||||
|
|
||||||
|
@ -222,7 +215,7 @@ jobs:
|
||||||
with:
|
with:
|
||||||
workflow: build-desktop.yml
|
workflow: build-desktop.yml
|
||||||
workflow_conclusion: success
|
workflow_conclusion: success
|
||||||
branch: ${{ needs.setup.outputs.branch-name }}
|
branch: ${{ github.ref_name }}
|
||||||
artifacts: bitwarden.${{ env._PKG_VERSION }}.nupkg
|
artifacts: bitwarden.${{ env._PKG_VERSION }}.nupkg
|
||||||
path: apps/desktop/dist
|
path: apps/desktop/dist
|
||||||
|
|
||||||
|
|
|
@ -21,7 +21,6 @@ jobs:
|
||||||
outputs:
|
outputs:
|
||||||
release_version: ${{ steps.version.outputs.version }}
|
release_version: ${{ steps.version.outputs.version }}
|
||||||
tag_version: ${{ steps.version.outputs.tag }}
|
tag_version: ${{ steps.version.outputs.tag }}
|
||||||
branch_name: ${{ steps.branch.outputs.branch_name }}
|
|
||||||
steps:
|
steps:
|
||||||
- name: Branch check
|
- name: Branch check
|
||||||
if: ${{ github.event.inputs.release_type != 'Dry Run' }}
|
if: ${{ github.event.inputs.release_type != 'Dry Run' }}
|
||||||
|
@ -46,19 +45,13 @@ jobs:
|
||||||
monorepo: true
|
monorepo: true
|
||||||
monorepo-project: web
|
monorepo-project: web
|
||||||
|
|
||||||
- name: Get branch name
|
|
||||||
id: branch
|
|
||||||
run: |
|
|
||||||
BRANCH_NAME=$(basename ${{ github.ref }})
|
|
||||||
echo "::set-output name=branch_name::$BRANCH_NAME"
|
|
||||||
|
|
||||||
|
|
||||||
self-host:
|
self-host:
|
||||||
name: Release self-host docker
|
name: Release self-host docker
|
||||||
runs-on: ubuntu-20.04
|
runs-on: ubuntu-20.04
|
||||||
needs: setup
|
needs: setup
|
||||||
env:
|
env:
|
||||||
_BRANCH_NAME: ${{ needs.setup.outputs.branch_name }}
|
_BRANCH_NAME: ${{ github.ref_name }}
|
||||||
_RELEASE_VERSION: ${{ needs.setup.outputs.release_version }}
|
_RELEASE_VERSION: ${{ needs.setup.outputs.release_version }}
|
||||||
_RELEASE_OPTION: ${{ github.event.inputs.release_type }}
|
_RELEASE_OPTION: ${{ github.event.inputs.release_type }}
|
||||||
steps:
|
steps:
|
||||||
|
@ -91,8 +84,12 @@ jobs:
|
||||||
|
|
||||||
- name: Docker Tag version and latest image
|
- name: Docker Tag version and latest image
|
||||||
run: |
|
run: |
|
||||||
docker tag bitwarden/web:$_BRANCH_NAME bitwarden/web:$_RELEASE_VERSION
|
if [[ "${{ github.event.inputs.release_type }}" == "Dry Run" ]]; then
|
||||||
docker tag bitwarden/web:$_BRANCH_NAME bitwarden/web:latest
|
docker tag bitwarden/web:latest bitwarden/web:$_RELEASE_VERSION
|
||||||
|
else
|
||||||
|
docker tag bitwarden/web:$_BRANCH_NAME bitwarden/web:$_RELEASE_VERSION
|
||||||
|
docker tag bitwarden/web:$_BRANCH_NAME bitwarden/web:latest
|
||||||
|
fi
|
||||||
|
|
||||||
- name: Docker Push version and latest image
|
- name: Docker Push version and latest image
|
||||||
if: ${{ github.event.inputs.release_type != 'Dry Run' }}
|
if: ${{ github.event.inputs.release_type != 'Dry Run' }}
|
||||||
|
@ -121,11 +118,19 @@ jobs:
|
||||||
env:
|
env:
|
||||||
REGISTRY: bitwardenqa.azurecr.io
|
REGISTRY: bitwardenqa.azurecr.io
|
||||||
run: |
|
run: |
|
||||||
docker tag bitwarden/web:$_BRANCH_NAME $REGISTRY/web:$_RELEASE_VERSION
|
if [[ "${{ github.event.inputs.release_type }}" == "Dry Run" ]]; then
|
||||||
docker tag bitwarden/web:$_BRANCH_NAME $REGISTRY/web:latest
|
docker tag bitwarden/web:latest $REGISTRY/web:$_RELEASE_VERSION
|
||||||
|
docker tag bitwarden/web:latest $REGISTRY/web:latest
|
||||||
|
|
||||||
docker tag bitwarden/web:$_BRANCH_NAME $REGISTRY/web-sh:$_RELEASE_VERSION
|
docker tag bitwarden/web:latest $REGISTRY/web-sh:$_RELEASE_VERSION
|
||||||
docker tag bitwarden/web:$_BRANCH_NAME $REGISTRY/web-sh:latest
|
docker tag bitwarden/web:latest $REGISTRY/web-sh:latest
|
||||||
|
else
|
||||||
|
docker tag bitwarden/web:$_BRANCH_NAME $REGISTRY/web:$_RELEASE_VERSION
|
||||||
|
docker tag bitwarden/web:$_BRANCH_NAME $REGISTRY/web:latest
|
||||||
|
|
||||||
|
docker tag bitwarden/web:$_BRANCH_NAME $REGISTRY/web-sh:$_RELEASE_VERSION
|
||||||
|
docker tag bitwarden/web:$_BRANCH_NAME $REGISTRY/web-sh:latest
|
||||||
|
fi
|
||||||
|
|
||||||
- name: Push version and latest image
|
- name: Push version and latest image
|
||||||
if: ${{ github.event.inputs.release_type != 'Dry Run' }}
|
if: ${{ github.event.inputs.release_type != 'Dry Run' }}
|
||||||
|
@ -161,7 +166,7 @@ jobs:
|
||||||
workflow: build-web.yml
|
workflow: build-web.yml
|
||||||
path: apps/web
|
path: apps/web
|
||||||
workflow_conclusion: success
|
workflow_conclusion: success
|
||||||
branch: ${{ needs.setup.outputs.branch_name }}
|
branch: ${{ github.ref_name }}
|
||||||
artifacts: web-*-cloud-COMMERCIAL.zip
|
artifacts: web-*-cloud-COMMERCIAL.zip
|
||||||
|
|
||||||
# This should result in a build directory in the current working directory
|
# This should result in a build directory in the current working directory
|
||||||
|
@ -185,7 +190,7 @@ jobs:
|
||||||
- name: Deploy CloudFlare Pages
|
- name: Deploy CloudFlare Pages
|
||||||
run: |
|
run: |
|
||||||
rm -rf ./*
|
rm -rf ./*
|
||||||
cp -R apps/web/build/* .
|
cp -R ../apps/web/build/* .
|
||||||
working-directory: deployment
|
working-directory: deployment
|
||||||
|
|
||||||
- name: Create cf-pages-deploy branch
|
- name: Create cf-pages-deploy branch
|
||||||
|
@ -222,7 +227,7 @@ jobs:
|
||||||
workflow: build-web.yml
|
workflow: build-web.yml
|
||||||
path: apps/web/artifacts
|
path: apps/web/artifacts
|
||||||
workflow_conclusion: success
|
workflow_conclusion: success
|
||||||
branch: ${{ needs.setup.outputs.branch_name }}
|
branch: ${{ github.ref_name }}
|
||||||
artifacts: "web-*-selfhosted-COMMERCIAL.zip,
|
artifacts: "web-*-selfhosted-COMMERCIAL.zip,
|
||||||
web-*-selfhosted-open-source.zip"
|
web-*-selfhosted-open-source.zip"
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue