chore: refactor code #32
This file contains hidden or 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
| name: CI | |
| on: push | |
| jobs: | |
| build: | |
| name: Build | |
| runs-on: ubuntu-24.04 | |
| permissions: | |
| contents: read | |
| id-token: write | |
| attestations: write | |
| steps: | |
| - name: Clone repository | |
| uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0 | |
| with: | |
| persist-credentials: 'false' | |
| - name: Setup Node.js | |
| uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0 | |
| with: | |
| node-version-file: '.nvmrc' | |
| - name: Install dependencies | |
| run: npm ci | |
| - name: Build artifacts | |
| run: | | |
| npm run build:prod:zip:chrome | |
| npm run build:prod:zip:edge | |
| npm run build:prod:zip:firefox | |
| npm run build:prod:zip:opera | |
| - name: Create attestation | |
| uses: actions/attest@59d89421af93a897026c735860bf21b6eb4f7b26 # v4.1.0 | |
| if: startsWith(github.ref, 'refs/tags/v') | |
| with: | |
| subject-path: artifacts/*/* | |
| - name: Upload artifacts | |
| uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 | |
| if: startsWith(github.ref, 'refs/tags/v') | |
| with: | |
| name: artifacts | |
| path: artifacts/ | |
| if-no-files-found: 'error' | |
| retention-days: 1 | |
| release: | |
| name: Release on GitHub | |
| runs-on: ubuntu-24.04 | |
| needs: [build] | |
| if: startsWith(github.ref, 'refs/tags/v') | |
| permissions: | |
| contents: write | |
| steps: | |
| - name: Download artifacts | |
| uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1 | |
| with: | |
| name: artifacts | |
| path: artifacts/ | |
| - name: Create release | |
| uses: softprops/action-gh-release@718ea10b132b3b2eba29c1007bb80653f286566b # v3.0.1 | |
| with: | |
| tag_name: ${{ github.ref_name }} | |
| name: ${{ github.ref_name }} | |
| body: | | |
| Download and install the extension from the [extension store](https://github.com/dessant/clear-browsing-data#readme) of your browser. | |
| Learn more about this release from the [changelog](https://github.com/dessant/clear-browsing-data/blob/main/CHANGELOG.md#changelog). | |
| files: artifacts/*/* | |
| fail_on_unmatched_files: true | |
| draft: true |