1
0
mirror of https://github.com/bitwarden/browser synced 2025-12-12 06:13:38 +00:00

Update master to main in workflows (#7151)

This commit is contained in:
Joseph Flinn
2023-12-12 11:57:50 -08:00
committed by GitHub
parent bb096724b2
commit 9c1169d035
16 changed files with 46 additions and 46 deletions

View File

@@ -4,7 +4,7 @@ name: Auto Update Branch
on: on:
push: push:
branches: branches:
- 'master' - 'main'
- 'rc' - 'rc'
paths: paths:
- 'apps/web/**' - 'apps/web/**'

View File

@@ -14,7 +14,7 @@ on:
- '!*.txt' - '!*.txt'
push: push:
branches: branches:
- 'master' - 'main'
- 'rc' - 'rc'
- 'hotfix-rc-browser' - 'hotfix-rc-browser'
paths: paths:
@@ -351,7 +351,7 @@ jobs:
crowdin-push: crowdin-push:
name: Crowdin Push name: Crowdin Push
if: github.ref == 'refs/heads/master' if: github.ref == 'refs/heads/main'
runs-on: ubuntu-22.04 runs-on: ubuntu-22.04
needs: needs:
- build - build
@@ -380,7 +380,7 @@ jobs:
CROWDIN_PROJECT_ID: "268134" CROWDIN_PROJECT_ID: "268134"
with: with:
config: apps/browser/crowdin.yml config: apps/browser/crowdin.yml
crowdin_branch_name: master crowdin_branch_name: main
upload_sources: true upload_sources: true
upload_translations: false upload_translations: false
@@ -397,7 +397,7 @@ jobs:
- crowdin-push - crowdin-push
steps: steps:
- name: Check if any job failed - name: Check if any job failed
if: ${{ (github.ref == 'refs/heads/master') || (github.ref == 'refs/heads/rc') }} if: ${{ (github.ref == 'refs/heads/main') || (github.ref == 'refs/heads/rc') }}
env: env:
CLOC_STATUS: ${{ needs.cloc.result }} CLOC_STATUS: ${{ needs.cloc.result }}
SETUP_STATUS: ${{ needs.setup.result }} SETUP_STATUS: ${{ needs.setup.result }}

View File

@@ -15,7 +15,7 @@ on:
- '.github/workflows/build-cli.yml' - '.github/workflows/build-cli.yml'
push: push:
branches: branches:
- 'master' - 'main'
- 'rc' - 'rc'
- 'hotfix-rc-cli' - 'hotfix-rc-cli'
paths: paths:
@@ -379,7 +379,7 @@ jobs:
steps: steps:
- name: Check if any job failed - name: Check if any job failed
working-directory: ${{ github.workspace }} working-directory: ${{ github.workspace }}
if: ${{ (github.ref == 'refs/heads/master') || (github.ref == 'refs/heads/rc') }} if: ${{ (github.ref == 'refs/heads/main') || (github.ref == 'refs/heads/rc') }}
env: env:
CLOC_STATUS: ${{ needs.cloc.result }} CLOC_STATUS: ${{ needs.cloc.result }}
SETUP_STATUS: ${{ needs.setup.result }} SETUP_STATUS: ${{ needs.setup.result }}

View File

@@ -15,7 +15,7 @@ on:
- '.github/workflows/build-desktop.yml' - '.github/workflows/build-desktop.yml'
push: push:
branches: branches:
- 'master' - 'main'
- 'rc' - 'rc'
- 'hotfix-rc-desktop' - 'hotfix-rc-desktop'
paths: paths:
@@ -973,7 +973,7 @@ jobs:
APPLE_ID_USERNAME: ${{ secrets.APPLE_ID_USERNAME }} APPLE_ID_USERNAME: ${{ secrets.APPLE_ID_USERNAME }}
APPLE_ID_PASSWORD: ${{ secrets.APPLE_ID_PASSWORD }} APPLE_ID_PASSWORD: ${{ secrets.APPLE_ID_PASSWORD }}
if: | if: |
(github.ref == 'refs/heads/master' (github.ref == 'refs/heads/main'
&& needs.setup.outputs.rc_branch_exists == 0 && needs.setup.outputs.rc_branch_exists == 0
&& needs.setup.outputs.hotfix_branch_exists == 0) && needs.setup.outputs.hotfix_branch_exists == 0)
|| (github.ref == 'refs/heads/rc' && needs.setup.outputs.hotfix_branch_exists == 0) || (github.ref == 'refs/heads/rc' && needs.setup.outputs.hotfix_branch_exists == 0)
@@ -1154,7 +1154,7 @@ jobs:
crowdin-push: crowdin-push:
name: Crowdin Push name: Crowdin Push
if: github.ref == 'refs/heads/master' if: github.ref == 'refs/heads/main'
needs: needs:
- linux - linux
- windows - windows
@@ -1185,7 +1185,7 @@ jobs:
CROWDIN_PROJECT_ID: "299360" CROWDIN_PROJECT_ID: "299360"
with: with:
config: apps/desktop/crowdin.yml config: apps/desktop/crowdin.yml
crowdin_branch_name: master crowdin_branch_name: main
upload_sources: true upload_sources: true
upload_translations: false upload_translations: false
@@ -1207,7 +1207,7 @@ jobs:
- crowdin-push - crowdin-push
steps: steps:
- name: Check if any job failed - name: Check if any job failed
if: ${{ (github.ref == 'refs/heads/master') || (github.ref == 'refs/heads/rc') }} if: ${{ (github.ref == 'refs/heads/main') || (github.ref == 'refs/heads/rc') }}
env: env:
CLOC_STATUS: ${{ needs.cloc.result }} CLOC_STATUS: ${{ needs.cloc.result }}
ELECTRON_VERIFY_STATUS: ${{ needs.electron-verify.result }} ELECTRON_VERIFY_STATUS: ${{ needs.electron-verify.result }}

View File

@@ -15,7 +15,7 @@ on:
- '.github/workflows/build-web.yml' - '.github/workflows/build-web.yml'
push: push:
branches: branches:
- 'master' - 'main'
- 'rc' - 'rc'
- 'hotfix-rc-web' - 'hotfix-rc-web'
paths: paths:
@@ -170,7 +170,7 @@ jobs:
- name: Check Branch to Publish - name: Check Branch to Publish
env: env:
PUBLISH_BRANCHES: "master,rc,hotfix-rc-web" PUBLISH_BRANCHES: "main,rc,hotfix-rc-web"
id: publish-branch-check id: publish-branch-check
run: | run: |
IFS="," read -a publish_branches <<< $PUBLISH_BRANCHES IFS="," read -a publish_branches <<< $PUBLISH_BRANCHES
@@ -218,7 +218,7 @@ jobs:
IMAGE_TAG=$(echo "${GITHUB_REF:11}" | sed "s#/#-#g") IMAGE_TAG=$(echo "${GITHUB_REF:11}" | sed "s#/#-#g")
fi fi
if [[ "$IMAGE_TAG" == "master" ]]; then if [[ "$IMAGE_TAG" == "main" ]]; then
IMAGE_TAG=dev IMAGE_TAG=dev
fi fi
@@ -259,7 +259,7 @@ jobs:
crowdin-push: crowdin-push:
name: Crowdin Push name: Crowdin Push
if: github.ref == 'refs/heads/master' if: github.ref == 'refs/heads/main'
needs: build-artifacts needs: build-artifacts
runs-on: ubuntu-22.04 runs-on: ubuntu-22.04
steps: steps:
@@ -286,7 +286,7 @@ jobs:
CROWDIN_PROJECT_ID: "308189" CROWDIN_PROJECT_ID: "308189"
with: with:
config: apps/web/crowdin.yml config: apps/web/crowdin.yml
crowdin_branch_name: master crowdin_branch_name: main
upload_sources: true upload_sources: true
upload_translations: false upload_translations: false
@@ -303,7 +303,7 @@ jobs:
- crowdin-push - crowdin-push
steps: steps:
- name: Check if any job failed - name: Check if any job failed
if: ${{ (github.ref == 'refs/heads/master') || (github.ref == 'refs/heads/rc') }} if: ${{ (github.ref == 'refs/heads/main') || (github.ref == 'refs/heads/rc') }}
env: env:
CLOC_STATUS: ${{ needs.cloc.result }} CLOC_STATUS: ${{ needs.cloc.result }}
SETUP_STATUS: ${{ needs.setup.result }} SETUP_STATUS: ${{ needs.setup.result }}

View File

@@ -45,7 +45,7 @@ jobs:
CROWDIN_PROJECT_ID: ${{ matrix.crowdin_project_id }} CROWDIN_PROJECT_ID: ${{ matrix.crowdin_project_id }}
with: with:
config: crowdin.yml config: crowdin.yml
crowdin_branch_name: master crowdin_branch_name: main
upload_sources: false upload_sources: false
upload_translations: false upload_translations: false
download_translations: true download_translations: true

View File

@@ -5,10 +5,10 @@ on:
workflow_dispatch: workflow_dispatch:
inputs: inputs:
tag: tag:
description: "Branch name to deploy (examples: 'master', 'feature/sm')" description: "Branch name to deploy (examples: 'main', 'feature/sm')"
required: true required: true
type: string type: string
default: master default: main
jobs: jobs:
azure-deploy: azure-deploy:

View File

@@ -5,10 +5,10 @@ on:
workflow_dispatch: workflow_dispatch:
inputs: inputs:
tag: tag:
description: "Branch name to deploy (examples: 'master', 'feature/sm')" description: "Branch name to deploy (examples: 'main', 'feature/sm')"
required: true required: true
type: string type: string
default: master default: main
jobs: jobs:
notify-start: notify-start:

View File

@@ -1,5 +1,5 @@
# Runs creation of Pull Requests # Runs creation of Pull Requests
# If the PR destination branch is master, add a needs-qa label unless created by renovate[bot] # If the PR destination branch is main, add a needs-qa label unless created by renovate[bot]
--- ---
name: Label Issue Pull Request name: Label Issue Pull Request
@@ -10,7 +10,7 @@ on:
paths-ignore: paths-ignore:
- .github/workflows/** # We don't need QA on workflow changes - .github/workflows/** # We don't need QA on workflow changes
branches: branches:
- 'master' # We only want to check when PRs target master - 'main' # We only want to check when PRs target main
jobs: jobs:
add-needs-qa-label: add-needs-qa-label:

View File

@@ -114,13 +114,13 @@ jobs:
dist-firefox-*.zip, dist-firefox-*.zip,
dist-edge-*.zip' dist-edge-*.zip'
- name: Dry Run - Download latest master build artifacts - name: Dry Run - Download latest build artifacts
if: ${{ github.event.inputs.release_type == 'Dry Run' }} if: ${{ github.event.inputs.release_type == 'Dry Run' }}
uses: bitwarden/gh-actions/download-artifacts@main uses: bitwarden/gh-actions/download-artifacts@main
with: with:
workflow: build-browser.yml workflow: build-browser.yml
workflow_conclusion: success workflow_conclusion: success
branch: master branch: main
artifacts: 'browser-source-*.zip, artifacts: 'browser-source-*.zip,
dist-chrome-*.zip, dist-chrome-*.zip,
dist-opera-*.zip, dist-opera-*.zip,

View File

@@ -92,7 +92,7 @@ jobs:
workflow: build-cli.yml workflow: build-cli.yml
path: apps/cli path: apps/cli
workflow_conclusion: success workflow_conclusion: success
branch: master branch: main
- name: Create release - name: Create release
if: ${{ github.event.inputs.release_type != 'Dry Run' }} if: ${{ github.event.inputs.release_type != 'Dry Run' }}
@@ -175,7 +175,7 @@ jobs:
workflow: build-cli.yml workflow: build-cli.yml
path: apps/cli path: apps/cli
workflow_conclusion: success workflow_conclusion: success
branch: master branch: main
artifacts: bw_${{ env._PKG_VERSION }}_amd64.snap artifacts: bw_${{ env._PKG_VERSION }}_amd64.snap
- name: Publish Snap & logout - name: Publish Snap & logout
@@ -235,7 +235,7 @@ jobs:
workflow: build-cli.yml workflow: build-cli.yml
path: apps/cli/dist path: apps/cli/dist
workflow_conclusion: success workflow_conclusion: success
branch: master branch: main
artifacts: bitwarden-cli.${{ env._PKG_VERSION }}.nupkg artifacts: bitwarden-cli.${{ env._PKG_VERSION }}.nupkg
- name: Push to Chocolatey - name: Push to Chocolatey
@@ -285,7 +285,7 @@ jobs:
workflow: build-cli.yml workflow: build-cli.yml
path: apps/cli/build path: apps/cli/build
workflow_conclusion: success workflow_conclusion: success
branch: master branch: main
artifacts: bitwarden-cli-${{ env._PKG_VERSION }}-npm-build.zip artifacts: bitwarden-cli-${{ env._PKG_VERSION }}-npm-build.zip
- name: Setup NPM - name: Setup NPM

View File

@@ -28,9 +28,9 @@ jobs:
- name: Branch check - name: Branch check
run: | run: |
if [[ "$GITHUB_REF" != "refs/heads/master" ]] && [[ "$GITHUB_REF" != "refs/heads/rc" ]] && [[ "$GITHUB_REF" != "refs/heads/hotfix-rc" ]]; then if [[ "$GITHUB_REF" != "refs/heads/main" ]] && [[ "$GITHUB_REF" != "refs/heads/rc" ]] && [[ "$GITHUB_REF" != "refs/heads/hotfix-rc" ]]; then
echo "===================================" echo "==================================="
echo "[!] Can only release from the 'master', 'rc' or 'hotfix-rc' branches" echo "[!] Can only release from the 'main', 'rc' or 'hotfix-rc' branches"
echo "===================================" echo "==================================="
exit 1 exit 1
fi fi
@@ -661,13 +661,13 @@ jobs:
branch: rc branch: rc
path: ${{ github.workspace }}/browser-build-artifacts path: ${{ github.workspace }}/browser-build-artifacts
- name: Download artifact from master - name: Download artifacts from main
if: ${{ github.ref != 'refs/heads/rc' && github.ref != 'refs/heads/hotfix-rc' }} if: ${{ github.ref != 'refs/heads/rc' && github.ref != 'refs/heads/hotfix-rc' }}
uses: dawidd6/action-download-artifact@246dbf436b23d7c49e21a7ab8204ca9ecd1fe615 # v2.27.0 uses: dawidd6/action-download-artifact@246dbf436b23d7c49e21a7ab8204ca9ecd1fe615 # v2.27.0
with: with:
workflow: build-browser.yml workflow: build-browser.yml
workflow_conclusion: success workflow_conclusion: success
branch: master branch: main
path: ${{ github.workspace }}/browser-build-artifacts path: ${{ github.workspace }}/browser-build-artifacts
- name: Unzip Safari artifact - name: Unzip Safari artifact
@@ -859,13 +859,13 @@ jobs:
branch: rc branch: rc
path: ${{ github.workspace }}/browser-build-artifacts path: ${{ github.workspace }}/browser-build-artifacts
- name: Download artifact from master - name: Download artifact from main
if: ${{ github.ref != 'refs/heads/rc' && github.ref != 'refs/heads/hotfix-rc' }} if: ${{ github.ref != 'refs/heads/rc' && github.ref != 'refs/heads/hotfix-rc' }}
uses: dawidd6/action-download-artifact@246dbf436b23d7c49e21a7ab8204ca9ecd1fe615 # v2.27.0 uses: dawidd6/action-download-artifact@246dbf436b23d7c49e21a7ab8204ca9ecd1fe615 # v2.27.0
with: with:
workflow: build-browser.yml workflow: build-browser.yml
workflow_conclusion: success workflow_conclusion: success
branch: master branch: main
path: ${{ github.workspace }}/browser-build-artifacts path: ${{ github.workspace }}/browser-build-artifacts
- name: Unzip Safari artifact - name: Unzip Safari artifact

View File

@@ -136,7 +136,7 @@ jobs:
with: with:
workflow: build-desktop.yml workflow: build-desktop.yml
workflow_conclusion: success workflow_conclusion: success
branch: master branch: main
path: apps/desktop/artifacts path: apps/desktop/artifacts
- name: Rename .pkg to .pkg.archive - name: Rename .pkg to .pkg.archive
@@ -291,7 +291,7 @@ jobs:
with: with:
workflow: build-desktop.yml workflow: build-desktop.yml
workflow_conclusion: success workflow_conclusion: success
branch: master branch: main
artifacts: bitwarden_${{ env._PKG_VERSION }}_amd64.snap artifacts: bitwarden_${{ env._PKG_VERSION }}_amd64.snap
path: apps/desktop/dist path: apps/desktop/dist
@@ -359,7 +359,7 @@ jobs:
with: with:
workflow: build-desktop.yml workflow: build-desktop.yml
workflow_conclusion: success workflow_conclusion: success
branch: master branch: main
artifacts: bitwarden.${{ env._PKG_VERSION }}.nupkg artifacts: bitwarden.${{ env._PKG_VERSION }}.nupkg
path: apps/desktop/dist path: apps/desktop/dist

View File

@@ -159,7 +159,7 @@ jobs:
workflow: build-web.yml workflow: build-web.yml
path: assets path: assets
workflow_conclusion: success workflow_conclusion: success
branch: master branch: main
artifacts: web-*-cloud-COMMERCIAL.zip artifacts: web-*-cloud-COMMERCIAL.zip
- name: Unzip build asset - name: Unzip build asset
@@ -196,12 +196,12 @@ jobs:
gh pr create --title "Deploy v${_RELEASE_VERSION} to GitHub Pages" \ gh pr create --title "Deploy v${_RELEASE_VERSION} to GitHub Pages" \
--draft \ --draft \
--body "Deploying v${_RELEASE_VERSION}" \ --body "Deploying v${_RELEASE_VERSION}" \
--base master \ --base main \
--head "${_BRANCH}" --head "${_BRANCH}"
else else
gh pr create --title "Deploy v${_RELEASE_VERSION} to GitHub Pages" \ gh pr create --title "Deploy v${_RELEASE_VERSION} to GitHub Pages" \
--body "Deploying v${_RELEASE_VERSION}" \ --body "Deploying v${_RELEASE_VERSION}" \
--base master \ --base main \
--head "${_BRANCH}" --head "${_BRANCH}"
fi fi
@@ -243,7 +243,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: master branch: main
artifacts: "web-*-selfhosted-COMMERCIAL.zip, artifacts: "web-*-selfhosted-COMMERCIAL.zip,
web-*-selfhosted-open-source.zip" web-*-selfhosted-open-source.zip"

View File

@@ -27,4 +27,4 @@ jobs:
If youre still working on this, please respond here after youve made the changes weve requested and our team will re-open it for further review. If youre still working on this, please respond here after youve made the changes weve requested and our team will re-open it for further review.
Please make sure to resolve any conflicts with the master branch before requesting another review. Please make sure to resolve any conflicts with the main branch before requesting another review.

View File

@@ -286,7 +286,7 @@ jobs:
TITLE: "Bump ${{ steps.create-branch.outputs.client }} version to ${{ inputs.version_number }}" TITLE: "Bump ${{ steps.create-branch.outputs.client }} version to ${{ inputs.version_number }}"
run: | run: |
PR_URL=$(gh pr create --title "$TITLE" \ PR_URL=$(gh pr create --title "$TITLE" \
--base "master" \ --base "main" \
--head "$PR_BRANCH" \ --head "$PR_BRANCH" \
--label "version update" \ --label "version update" \
--label "automated pr" \ --label "automated pr" \