diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 0ce2f70..97e231e 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -1,34 +1,44 @@ -name: Build +name: Lint & Build on: - push: - release: - types: - - created + push: + branches: + - main + pull_request: + branches: + - main + release: + types: + - created jobs: - build: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v2 - - uses: actions/setup-python@v2 - with: - python-version: '3.x' - - name: Install dependencies - run: | - python -m pip install --upgrade pip - python -m pip install opencc - - name: Build - run: python build.py - - name: Upload artifact - uses: actions/upload-artifact@v2 - with: - name: inject-jyutping - path: | - _locales - background_scripts - content_scripts - icons - lib - popup - manifest.json + build: + runs-on: ubuntu-latest + steps: + - name: Checkout code + uses: actions/checkout@v4 + + - name: Set up Node.js + uses: actions/setup-node@v4 + + - name: Install dependencies + run: npm i + + - name: Run lint + run: npm run lint + + - name: Upload artifact + if: ${{ github.event_name == 'release' }} + uses: actions/upload-artifact@v4 + with: + name: inject-jyutping + path: | + _locales + background_scripts + content_scripts + icons + lib + popup + manifest.json + node_modules/webextension-polyfill/dist/browser-polyfill.min.js + node_modules/to-jyutping/dist/index.js diff --git a/.gitignore b/.gitignore index b087f0b..43a5949 100644 --- a/.gitignore +++ b/.gitignore @@ -1,6 +1,4 @@ -/jyut6ping3.dict.yaml -/jyut6ping3.simple.dict.yaml -/background_scripts/dictionary.json.txt -/preprocess.py -/lib/browser-polyfill.js -/inject-jyutping.zip +inject-jyutping.zip +node_modules +DS_Store +jsconfig.tsbuildinfo diff --git a/LICENSE b/LICENSE index d0e8a13..cad56c5 100644 --- a/LICENSE +++ b/LICENSE @@ -1,6 +1,6 @@ BSD 2-Clause License -Copyright (c) 2020, Cantonese Computational Linguistics Infrastructure Development Workgroup +Copyright (c) 2024, Cantonese Computational Linguistics Infrastructure Development Workgroup All rights reserved. Redistribution and use in source and binary forms, with or without diff --git a/README.md b/README.md index f729e5e..1a18e8e 100644 --- a/README.md +++ b/README.md @@ -1,22 +1,14 @@