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