feat(site-blocklist): add site-specific blocklist with UI and sync st… #13
Workflow file for this run
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: Release Workflow | |
| on: | |
| push: | |
| tags: | |
| - 'v*' | |
| workflow_dispatch: | |
| inputs: | |
| version_type: | |
| description: 'Version type' | |
| type: choice | |
| options: | |
| - patch | |
| - minor | |
| - major | |
| - prepatch | |
| - preminor | |
| - premajor | |
| required: true | |
| default: 'patch' | |
| jobs: | |
| release: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: '24' | |
| cache: 'npm' | |
| - name: Install dependencies | |
| run: npm ci | |
| - name: Run tests | |
| run: npm test | |
| - name: Update version number | |
| if: github.event_name == 'workflow_dispatch' | |
| id: version_update | |
| run: | | |
| npm run version:${{ github.event.inputs.version_type }} | |
| VERSION=$(node -p "require('./package.json').version") | |
| echo "VERSION=${VERSION}" >> $GITHUB_ENV | |
| echo "CREATED_TAG=true" >> $GITHUB_ENV | |
| - name: Extract version from tag | |
| if: github.event_name == 'push' | |
| id: get_version | |
| run: | | |
| TAG=${GITHUB_REF#refs/tags/} | |
| VERSION=${TAG#v} | |
| echo "VERSION=${VERSION}" >> $GITHUB_ENV | |
| echo "CREATED_TAG=false" >> $GITHUB_ENV | |
| - name: Create private key file from Secret | |
| run: | | |
| echo "${{ secrets.CRX_PRIVATE_KEY }}" > key.pem | |
| chmod 600 key.pem | |
| - name: Build extension | |
| run: npm run build | |
| - name: Validate build | |
| run: npm run validate | |
| - name: Package as .crx | |
| run: npm run package | |
| - name: Create ZIP file | |
| run: npm run zip | |
| - name: Create GitHub Release | |
| id: create_release | |
| uses: softprops/action-gh-release@v1 | |
| with: | |
| name: v${{ env.VERSION }} | |
| tag_name: v${{ env.VERSION }} | |
| generate_release_notes: true | |
| files: | | |
| chrome-tabboost-v${{ env.VERSION }}.crx | |
| builds/chrome-tabboost-v${{ env.VERSION }}.zip | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Push tag and changes | |
| if: env.CREATED_TAG == 'true' | |
| run: | | |
| git push origin v${{ env.VERSION }} | |
| git push | |
| - name: Delete private key file | |
| if: always() | |
| run: rm -f key.pem |