Skip to content

remove redundant code in KeySelect, no chrome.storage.sync anymore #7

remove redundant code in KeySelect, no chrome.storage.sync anymore

remove redundant code in KeySelect, no chrome.storage.sync anymore #7

Workflow file for this run

name: Build and Release Chrome Extension
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Use Node.js
uses: actions/setup-node@v4
with:
node-version: '20.x'
- name: Install Yarn
run: npm install -g yarn
- name: Get yarn cache directory path
id: yarn-cache-dir-path
run: echo "dir=$(yarn cache dir)" >> $GITHUB_OUTPUT
- uses: actions/cache@v3
id: yarn-cache
with:
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-
- name: Install dependencies
run: yarn install --frozen-lockfile
- name: Build the extension
run: yarn build
- name: Zip the build
run: zip -r cantonese-helper-chrome-extension.zip dist
- name: Create Release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
gh release create v${{ github.run_number }} \
--title "Release ${{ github.run_number }}" \
--notes "Automated release for build ${{ github.run_number }}" \
cantonese-helper-chrome-extension.zip