LICENSE #46
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# https://github.com/bitwarden/clients/blob/main/.github/workflows/build-browser.yml | |
--- | |
name: Build | |
on: | |
workflow_dispatch: | |
push: | |
branches: [master, main] | |
schedule: | |
# On every Sunday 12:00 | |
- cron: "0 12 * * 0" | |
permissions: write-all | |
defaults: | |
run: | |
shell: bash | |
jobs: | |
build: | |
name: Build | |
runs-on: ubuntu-22.04 | |
steps: | |
- name: Checkout repo | |
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 | |
- name: Set up Node | |
uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v4.0.2 | |
with: | |
node-version: 18 # See .nvmrc | |
- name: Setup repo | |
run: | | |
chmod +x setup_repo.sh | |
./setup_repo.sh | |
- name: Print environment | |
run: | | |
node --version | |
npm --version | |
- name: Apply patch | |
run: | | |
chmod +x patch_code.sh | |
./patch_code.sh | |
- name: Build | |
run: | | |
chmod +x build_extension.sh | |
./build_extension.sh | |
# - name: Upload Chrome artifact | |
# uses: actions/upload-artifact@5d5d22a31266ced268874388b861e4b58bb5c2f3 # v4.3.1 | |
# continue-on-error: true | |
# with: | |
# path: clients/apps/browser/dist/dist-chrome.zip | |
# name: dist-chrome | |
- name: Upload dist folder | |
uses: actions/upload-artifact@5d5d22a31266ced268874388b861e4b58bb5c2f3 # v4.3.1 | |
with: | |
path: clients/apps/browser/dist/ | |
name: dist | |
- name: Upload src folder | |
uses: actions/upload-artifact@5d5d22a31266ced268874388b861e4b58bb5c2f3 # v4.3.1 | |
with: | |
path: clients/apps/browser/ | |
name: src | |
# - name: Setup Chrome | |
# uses: browser-actions/setup-chrome@361a23fcf94a523a91c9cfae6f11c2a5c2d87f64 # v1 | |
# continue-on-error: true | |
# - name: Pack Chrome Extension | |
# continue-on-error: true | |
# env: | |
# PACK_EXTENSION_KEY: ${{ secrets.PACK_EXTENSION_KEY }} | |
# run: | | |
# chmod +x pack_extension.sh | |
# ./pack_extension.sh | |
# - name: Upload Chrome Extension | |
# uses: actions/upload-artifact@5d5d22a31266ced268874388b861e4b58bb5c2f3 # v4.3.1 | |
# continue-on-error: true | |
# with: | |
# path: clients/apps/browser/dist/dist-chrome.crx | |
# name: dist-chrome-crx | |
- name: Push Changes | |
continue-on-error: true | |
run: | | |
# Copy dist | |
# cp clients/apps/browser/dist/dist-edge-mv3.zip . | |
# Set up git config | |
git config --local user.email "41898282+github-actions[bot]@users.noreply.github.com" | |
git config --local user.name "github-actions[bot]" | |
# Push changes | |
git add . | |
git commit -m "Build: $(date +%Y-%m-%d_%H-%M-%S)" | |
git push | |
- name: Upload Release | |
uses: marvinpinto/action-automatic-releases@d68defdd11f9dcc7f52f35c1b7c236ee7513bcc1 # Last commit before archived | |
continue-on-error: true | |
if: success() | |
with: | |
repo_token: "${{ secrets.GITHUB_TOKEN }}" | |
automatic_release_tag: "latest" | |
prerelease: false | |
title: "Latest Workflow Output" | |
files: | | |
clients/apps/browser/dist/* |