diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml index 8b3e746..e2d93f1 100644 --- a/.github/workflows/codeql-analysis.yml +++ b/.github/workflows/codeql-analysis.yml @@ -3,7 +3,7 @@ # # You may wish to alter this file to override the set of languages analyzed, # or to provide custom queries or build logic. -name: "CodeQL" +name: 'CodeQL' on: push: @@ -29,43 +29,43 @@ jobs: # https://docs.github.com/en/github/finding-security-vulnerabilities-and-errors-in-your-code/configuring-code-scanning#overriding-automatic-language-detection steps: - - name: Checkout repository - uses: actions/checkout@v2 - with: - # We must fetch at least the immediate parents so that if this is - # a pull request then we can checkout the head. - fetch-depth: 2 + - name: Checkout repository + uses: actions/checkout@v2 + with: + # We must fetch at least the immediate parents so that if this is + # a pull request then we can checkout the head. + fetch-depth: 2 - # If this run was triggered by a pull request event, then checkout - # the head of the pull request instead of the merge commit. - - run: git checkout HEAD^2 - if: ${{ github.event_name == 'pull_request' }} + # If this run was triggered by a pull request event, then checkout + # the head of the pull request instead of the merge commit. + - run: git checkout HEAD^2 + if: ${{ github.event_name == 'pull_request' }} - # Initializes the CodeQL tools for scanning. - - name: Initialize CodeQL - uses: github/codeql-action/init@v1 - with: - languages: ${{ matrix.language }} - # If you wish to specify custom queries, you can do so here or in a config file. - # By default, queries listed here will override any specified in a config file. - # Prefix the list here with "+" to use these queries and those in the config file. - # queries: ./path/to/local/query, your-org/your-repo/queries@main + # Initializes the CodeQL tools for scanning. + - name: Initialize CodeQL + uses: github/codeql-action/init@v1 + with: + languages: ${{ matrix.language }} + # If you wish to specify custom queries, you can do so here or in a config file. + # By default, queries listed here will override any specified in a config file. + # Prefix the list here with "+" to use these queries and those in the config file. + # queries: ./path/to/local/query, your-org/your-repo/queries@main - # Autobuild attempts to build any compiled languages (C/C++, C#, or Java). - # If this step fails, then you should remove it and run the build manually (see below) - - name: Autobuild - uses: github/codeql-action/autobuild@v1 + # Autobuild attempts to build any compiled languages (C/C++, C#, or Java). + # If this step fails, then you should remove it and run the build manually (see below) + - name: Autobuild + uses: github/codeql-action/autobuild@v1 - # ℹ️ Command-line programs to run using the OS shell. - # 📚 https://git.io/JvXDl + # ℹ️ Command-line programs to run using the OS shell. + # 📚 https://git.io/JvXDl - # ✏️ If the Autobuild fails above, remove it and uncomment the following three lines - # and modify them (or add more) to build your code if your project - # uses a compiled language + # ✏️ If the Autobuild fails above, remove it and uncomment the following three lines + # and modify them (or add more) to build your code if your project + # uses a compiled language - #- run: | - # make bootstrap - # make release + #- run: | + # make bootstrap + # make release - - name: Perform CodeQL Analysis - uses: github/codeql-action/analyze@v1 + - name: Perform CodeQL Analysis + uses: github/codeql-action/analyze@v2 diff --git a/.github/workflows/nodejs.yml b/.github/workflows/nodejs.yml index c7fa296..550616c 100644 --- a/.github/workflows/nodejs.yml +++ b/.github/workflows/nodejs.yml @@ -3,7 +3,6 @@ name: Node CI on: [push, pull_request] jobs: build: - runs-on: ubuntu-latest strategy: @@ -11,15 +10,15 @@ jobs: node-version: [18.x] steps: - - uses: actions/checkout@v1 - - name: Use Node.js ${{ matrix.node-version }} - uses: actions/setup-node@v1 - with: - node-version: ${{ matrix.node-version }} - - name: npm install, build, and test - run: | - npm install - npm run build --if-present - npm test - env: - CI: true + - uses: actions/checkout@v4 + - name: Use Node.js ${{ matrix.node-version }} + uses: actions/setup-node@v1 + with: + node-version: ${{ matrix.node-version }} + - name: npm install, build, and test + run: | + npm install + npm run build --if-present + npm test + env: + CI: true diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 23d326b..06bb9b3 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -15,7 +15,7 @@ jobs: version: ${{ steps.daily-version.outputs.version }} runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 with: fetch-depth: 20 - run: yarn install @@ -30,8 +30,7 @@ jobs: name: Create release env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - run: - gh release create "${{ steps.daily-version.outputs.version }}" + run: gh release create "${{ steps.daily-version.outputs.version }}" Build-and-upload-artifacts: needs: Version @@ -39,16 +38,16 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - node-version: [14.x] + node-version: [18.x] command: - firefox - chrome steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 - run: yarn install --frozen-lockfile - name: Use Node.js ${{ matrix.node-version }} - uses: actions/setup-node@v1 + uses: actions/setup-node@v4 with: node-version: ${{ matrix.node-version }} - name: yarn install, build, and test @@ -60,8 +59,9 @@ jobs: VER: ${{ needs.Version.outputs.version }} run: | yarn update-version:${{ matrix.command }} - - uses: actions/upload-artifact@v2 + - uses: actions/upload-artifact@v4 with: + name: auto-capitalise-artifacts-${{ strategy.job-index }} path: distribution Submit: @@ -75,7 +75,7 @@ jobs: - chrome runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 - run: yarn install - run: yarn build - name: Update extension’s meta diff --git a/distribution/manifest_v2.json b/distribution/manifest_v2.json index 1e7424d..8f6cda9 100644 --- a/distribution/manifest_v2.json +++ b/distribution/manifest_v2.json @@ -1,33 +1,45 @@ { - "name": "Auto Capitalise Sentence", - "description": "Browser add-on/extension to automatically capitalise the first letter of a sentence while typing.", - "homepage_url": "https://github.com/hrai/auto-capitalise-sentence/", - "manifest_version": 2, - "version": "0.0.0", - "browser_action": { - "default_icon": "icons/auto-capitalise-sentence.png", - "default_title": "Auto-capitalise sentence", - "default_popup": "popup/settings.html" - }, - "background": { - "scripts": ["dependencies/jquery.min.js", "lib/background.bundle.js"] - }, - "content_scripts": [ - { - "run_at": "document_end", - "matches": [""], - "js": [ - "dependencies/jquery.min.js", - "lib/main.bundle.js", - "lib/settings.bundle.js" - ] - } - ], - "icons": { - "16": "icons/auto-capitalise-sentence.png", - "48": "icons/auto-capitalise-sentence.png", - "128": "icons/auto-capitalise-sentence.png" - }, - "permissions": ["storage", "tabs"] + "name": "Auto Capitalise Sentence", + "description": "Firefox browser add-on/extension to automatically capitalise the first letter of a sentence while typing.", + "homepage_url": "https://github.com/hrai/auto-capitalise-sentence/", + "manifest_version": 2, + "version": "0.0.0", + "browser_action": { + "default_icon": "icons/auto-capitalise-sentence.png", + "default_title": "Auto-capitalise sentence", + "default_popup": "popup/settings.html" + }, + "background": { + "scripts": [ + "dependencies/jquery.min.js", + "lib/background.bundle.js" + ] + }, + "content_scripts": [ + { + "run_at": "document_end", + "matches": [ + "" + ], + "js": [ + "dependencies/jquery.min.js", + "lib/main.bundle.js", + "lib/settings.bundle.js" + ] + } + ], + "icons": { + "16": "icons/auto-capitalise-sentence.png", + "48": "icons/auto-capitalise-sentence.png", + "128": "icons/auto-capitalise-sentence.png" + }, + "permissions": [ + "storage", + "tabs" + ], + "browser_specific_settings": { + "gecko": { + "id": "{680e06ed-65ed-4e11-a9c0-0e6f80b9a347}" + } } - \ No newline at end of file +} diff --git a/distribution/manifest_v3.json b/distribution/manifest_v3.json index 596e1fc..0792cf3 100644 --- a/distribution/manifest_v3.json +++ b/distribution/manifest_v3.json @@ -1,6 +1,6 @@ { "name": "Auto Capitalise Sentence", - "description": "Browser add-on/extension to automatically capitalise the first letter of a sentence in text fields while typing.", + "description": "Chromium browser add-on/extension to automatically capitalise the first letter of a sentence in text fields while typing.", "homepage_url": "https://github.com/hrai/auto-capitalise-sentence/", "manifest_version": 3, "version": "0.0.0", @@ -35,4 +35,4 @@ "default_popup": "popup/settings.html" }, "content_security_policy": {} -} \ No newline at end of file +} diff --git a/package.json b/package.json index a72d77f..96dc78d 100644 --- a/package.json +++ b/package.json @@ -21,7 +21,7 @@ "lint-fix": "yarn eslint --fix .", "update-version:chrome": "yarn dot-json distribution/manifest_v3.json version $VER && cd distribution && mv manifest_v3.json manifest.json", "update-version:firefox": "yarn dot-json distribution/manifest_v2.json version $VER && cd distribution && mv manifest_v2.json manifest.json", - "release:firefox": "cd distribution && yarn web-ext-submit", + "release:firefox": "cd distribution && yarn web-ext sign --channel listed", "release:chrome": "cd distribution && npx chrome-webstore-upload-cli@2 upload --auto-publish", "prepare": "yarn husky install" }, @@ -55,7 +55,6 @@ "run-script-os": "^1.1.3", "sinon": "^19.0.2", "web-ext": "^8.2.0", - "web-ext-submit": "^7.8.0", "webextension-polyfill": "^0.12.0", "webpack": "^5.93.0", "webpack-cli": "^5.1.4"